Re: Error
Re: Error
- Subject: Re: Error
- From: Bob Stuller <email@hidden>
- Date: Fri, 15 Mar 2002 18:58:45 -0500
David, Greetings!
At 12:18 AM +0100 3/16/02, David Remahl wrote:
> 2002-03-16 00:05:57.824 SimpleLister[6716] *** _NSAutoreleaseNoPool():
Object 0x2965760 of class NSCFString autoreleased with no pool in place -
just leaking
> Anyone can tell me what does it means and what should i do with it?
Anyway, the way to solve it is to install an NSAutoreleasePool. Look at the
NSAutoreleasePool documentation, and/or the sample code in most examples
dealing with spawned threads or are command line programs.
Okay, good answer. I have a follow-on question however. I have a
little bundle that lives autonomously. It uses a pthread & I ran
into this error whenever I would do ObjC things in the thread body.
I added a "[[NSAutoreleasePool alloc] init];" at the start of the
thread function but, heeding the documentation that such a pool would
automatically disappear when the thread died, didn't bother to delete
the pool explicitly. Now I am wondering: Does that 'thread' from the
docs have to be an NSThread or can it be any thread, including my
pthread? Am I leaking the entire pool?
Peace,
Bob
--
"They that can give up essential liberty to obtain a little
temporary safety
deserve neither liberty or safety."
-- Benjamin Franklin
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: | |
| >Re: Error (From: David Remahl <email@hidden>) |