Re: NSError: why returned directly?
Re: NSError: why returned directly?
- Subject: Re: NSError: why returned directly?
- From: Jim Correia <email@hidden>
- Date: Wed, 26 Apr 2006 13:40:38 -0400
On Apr 26, 2006, at 11:58 AM, William Bumgarner wrote:
Left unchanged. This is the one key area that developers screw up
pretty consistently when first faced with NSError**. The rules:
It is also worth noting an additional "rule" which must be followed.
It is really nothing that isn't ordinary Cocoa memory management, but
might be easily overlooked when dealing with errors returned by
reference or raised exceptions. (And since the error/exception path
isn't the normal one, likely to escape initial testing.)
If you are using nested autorelease pools, and an NSError or
exception is generated within an interior autorelease pool, you must
ensure that the error or exception gets promoted to the outer pool as
you unwind.
Chris Hanson wrote about this a while ago, with examples.
http://chanson.livejournal.com/126035.html
Jim
_______________________________________________
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