iphone, mac os development and IBOutlets
as im reading the docs, in mac os x development i dont have to make properties for IBOutlets (because the viewcontroller or whatever retains the objects that needs to be retained, so only those which would be deallocated are retained), and don't have to release the outlets. in iphone programming, i don't have to have properties (because the viewcontroller or whatever r开发者_JS百科etains all the objects), but i have to release them in viewDidUnload…. am i true ? or not ? :)
That about summarizes it, on the iOS side. I'm not sure about the Mac OS view controllers being able to automatically release their outlets, but on iOS, unless you specify the IBOutlet
as a property with no retain
attribute (i.e. assign
), you're responsible for releasing it in -viewDidUnload
.
精彩评论