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 -

php - Boolean search on database with 5 million rows, very slow -

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