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 -

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

css - Text drops down with smaller window -