Re: memory problem, advice needed
Re: memory problem, advice needed
- Subject: Re: memory problem, advice needed
- From: Jonathon Mah <email@hidden>
- Date: Sat, 1 Apr 2006 17:02:18 +1030
Hi Paul,
NSArray *myBigArray = [NSArray arrayWithObjects: mySmallArray1,
mySmallArray2 ,nil];
How do I ensure that when myFun() ends, myBigArray is released?
Assuming you don't need to use myBigArray after myFun() returns, the
easiest way is to _not_ use autoreleasing convenience constructors.
i.e.
NSArray *myBigArray = [[NSArray alloc] initWithObjects:...];
//...
[myBigArray release];
Jonathon Mah
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden