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

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

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -