• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Immediate memory release
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Trouble with NSPopUpButton and hierarchical menus?
  • Next by Date: Re: Trouble with NSPopUpButton and hierarchical menus?
  • Previous by thread: Re: Immediate memory release
  • Next by thread: NSFormatter, NSTextfield and bindings
  • Index(es):
    • Date
    • Thread