What i understood about object allocations and its release in objective is ..this..
if suppose i allocated one object with alloc init then i need to release it after its last reference .
Like this way….
MyViewController *myView=[MyViewController alloc ]init];
[self.view presentModalViewController myView animated:YES];
[myView release];
However if suppose i need NSMutableArray .
and i set its as
@property(nonatomic, retain)NSMutableArray *myArr;
and need this array through out my viewcontroller means for instance say …. view has uitableview and its data source is this array (myArr).
And app is having its local copy of data storage through Sqlite3 .
so i m adding object to this array using select statemnt of sqlite 3 .
And as i need this data each time viewappears so i allocated this myArr in viewDidAppear
as…
myArr=[NSMutableArray alloc]init];
and i need to add value to each cell of uitableview in cellForRowAtIndexPath () method .
Means its las refernce is in cellForRowAtIndexPath()
So my question is that where should i release this allocated object of myArr
thnx in advnce
Kind Regards
Pagggyyy
I think the proper place would be