Re: Programatically detect if any autorelease pool exists?
Re: Programatically detect if any autorelease pool exists?
- Subject: Re: Programatically detect if any autorelease pool exists?
- From: Chris Suter <email@hidden>
- Date: Wed, 6 Sep 2006 11:02:22 +1000
I'm not sure how Objective C exceptions work with Objective C++,
but there's a chance this would break them if you needed them.
Indeed, mixing two languages' exception handling mechanisms at once
is a sure-fire recipe for disaster.
Personally I avoid using most types of exception handers in my own
code, so I didn't consider this, and don't know the solution. It's
possible that there is no good solution if you want two types of
exception handling to peacefully coexist.
It's not a good idea to try and release autorelease pools
automatically in this way, or, say, in a @finally block. You
shouldn't worry about releasing autorelease pools when exceptions are
thrown since they'll be tidied up for you when the next autorelease
pool is released. In fact, it's essential that you don't since the
NSException object will be autoreleased. This is all in the
documentation somewhere.
- Chris
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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