iphone - Should I release an unused ivar? -


i set in interface.h property as

@porperty(nonatomic, retain) *foo; 

if don't use ivar in implementation should release in dealloc ?

yes:

- (void)dealloc {     // other release code     [_foo release];      [super dealloc]; } 

edit: @borrrden tip avoiding setters during dealloc.


Comments

Popular posts from this blog

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

ruby on rails - Authlogic - how to make a registration and don't log in the new account? -