Re: NSHomeDirectory() leak?
Re: NSHomeDirectory() leak?
- Subject: Re: NSHomeDirectory() leak?
- From: j o a r <email@hidden>
- Date: Sun, 1 Feb 2004 15:46:20 +0100
The warning message does indicate a leak, but the problem is not that
the function is misbehaving, but that you don't have any autorelease
pool to catch autoreleased objects.
I guess that you're doing this in a thread, or some other context where
you don't get an autorelease pool for free. A default autorelease pool
is sometimes set up for you by AppKit, but in other cases you need to
take care of this yourself.
j o a r
On 2004-02-01, at 15.20, ralph fogg wrote:
>
I'm stuck with a silly problem! I have the following line:
>
>
NSLog ([NSHomeDirectory() stringByAppendingPathComponent:
>
@"Library/Application Support"]);
>
>
And I get the following error:
>
>
2004-02-01 15:19:29.731 App[12321] *** _NSAutoreleaseNoPool(): Object
>
0x30d070 of class NSCFString autoreleased with no pool in place - just
>
leaking
>
>
Can anybody help me? I'm new to all this and would be very thankful.
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.