Reputation: 9672
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 would be released by the system since IB is whats assigning them, what could I be doing wrong?
Upvotes: 1
Views: 248
Reputation: 12112
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.
Upvotes: 1