Re: Immediate memory release
Re: Immediate memory release
- Subject: Re: Immediate memory release
- From: Ken Thomases <email@hidden>
- Date: Thu, 1 May 2008 11:31:45 -0500
On Apr 30, 2008, at 10:35 PM, Melissa J. Turner wrote:
NSAutoreleasePool *pool = [NSAutoreleasePool new];
id exception;
Should be initialized to nil:
id exception = nil;
@try {
// insert code here
} @catch (NSException *ex) {
exception = [ex retain];
@throw ex;
} @finally {
[pool drain];
if (exception) {
[exception autorelease];
}
}
(Disclaimer: coded in mail)
-Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden