Re: NSSound and _NSAutoreleaseNoPool() - just leaking
Re: NSSound and _NSAutoreleaseNoPool() - just leaking
- Subject: Re: NSSound and _NSAutoreleaseNoPool() - just leaking
- From: Clark Cox <email@hidden>
- Date: Fri, 7 Jan 2005 09:00:50 -0500
On Fri, 7 Jan 2005 13:14:48 +0100, wuffwuffware <email@hidden> wrote:
> Dear list,
>
> I am adding the following line of code to my project:
>
> _endSound = [[NSSound soundNamed: @"timerAlong"] retain];
>
> and when I terminate my application I end up with the messages below in
> the console. The number of sounds I load does not matter. Removing this
> one line and the messages dont show up when I call [NSApp terminate:
> nil].
> Wrapping the _endSound into a NSAutoreleasePool did not help.
>
> Any pointer how to tackle the problem is greatly welcome.
The very first thing I would try would be to run under the debugger,
and put a breakpoint on _NSAutoreleaseNoPool to see exactly where this
autorelease is getting called. I suspect that what is happening is
that in some object's -dealloc method some objects are autoreleased,
but that this object is being deallocated *after* the last autorelease
pool has been destroyed.
--
Clark S. Cox III
email@hidden
http://www.livejournal.com/users/clarkcox3/
http://homepage.mac.com/clarkcox3/
_______________________________________________
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