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

php - cannot display multiple markers in google maps v3 from traceroute result -

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

javascript - firefox memory leak -