Re: My bug or Apple's?
Re: My bug or Apple's?
- Subject: Re: My bug or Apple's?
- From: John Stiles <email@hidden>
- Date: Fri, 12 Nov 2004 11:11:43 -0800
On Nov 12, 2004, at 9:24 AM, Bob Ippolito wrote:
On Nov 12, 2004, at 12:20 PM, Shawn Erickson wrote:
On Nov 12, 2004, at 7:00 AM, John Stiles wrote:
On Nov 11, 2004, at 6:49 PM, John Stiles wrote:
So what's the best solution here?
(a) Wrap this destructor with an autorelease pool
FWIW, I have tried (a) and the problem is solved.
I still don't know whether I should file this as a bug or not,
though. It seems perfectly reasonable to me that my atexit()
routines might want to do [obj release]. I can see implementation
reasons why this would be difficult, but it should be possible.
This is not a bug since you can send a release to an object... it is
just that the object correctly assumes that an autorelease pool
exists.
In general every thread that works with Cocoa objects (sends them
messages) should have at least a top level autorelease pool in place.
Review the documentation on auto release pools and memory management
to understand the assumptions that Cocoa works under.
Shouldn't you be using a notification to let your objects know that
the application is about to end instead of atexit? Expecting atexit
to work sounds perfectly unreasonable to me :)
This is a static destructor on a C++ object. It doesn't work that way.
_______________________________________________
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