开发者

When I use a .xib file to layout my viewController IBOutlets aren't being released when the view controller is released

I use a .xib to layout my viewController and have 10 IBOutlet objects that IB uses, none of them have @properties assigned to them (no @property(retain) IBOutlet...). When I release the viewController none of those objects are being released, I have to manually release them in the dealloc of the viewController.

This doesn't seem like normal behavior, I thought that those objects wo开发者_Python百科uld be released by the system since IB is whats assigning them, what could I be doing wrong?


Apple's Memory Management Programming Guide tells you exactly how to properly release IBOutlets.

In short, you are supposed to release them in dealloc, but you also want to release them in viewDidUnload.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜