[Help] Memory question
Hey guys!
I know there are several memory posts out there and a good link to Apple's doc but I am still confused.
Suppose we have this:
// .h file
NSMutableArray *aMutArray;
// .m file
inside -(id)init
if(!aMutArray) aMutArray = [[NSMutableArray alloc] init];
aMutArray gets used through the entire .m file inside methods, etc...
If I read previously, what I allocate, I need to dealloc. The question is where? At the end? (void)dealloc?
Thanks.
|