Possible Duplicate:
Do I need to release xib resources?
IBOutlet WeaponStoreViewTableCell *tblCell;
I have this instance variable in my code. It is tied to a NIB using interface builder. Do I need to throw a release for this in my dealloc method?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The way this is handled in iOS apps and Mac OS Apps seems to be difference, the underlining rule for retain/release are the same but iOS apps tend to use properties with (retains) properties to connect them to the item in you nib files so in this case you have to release to balance the retain from you property. In mac OS X the practice seems to be connect the interface elements straight to you ivars, which is a straight assign, in the situation you don, t have to blance with a release because the interact elements is retains by you NSNib object with is retains by you NSWindowController class so all of that is angled for you. My personnel feeling is that I attach interface elements straight to the ivar, so I don’t have to release them myself I will then have a property which is readonly since I vary rarely want to change an interface ivar once it has been set by the nib but this really is all just a matter of personnel style.