Re: Premature _NSAutoreleaseNoPool() warnings -And more
Re: Premature _NSAutoreleaseNoPool() warnings -And more
- Subject: Re: Premature _NSAutoreleaseNoPool() warnings -And more
- From: Ondra Cada <email@hidden>
- Date: Wed, 3 Apr 2002 21:21:31 +0200
On Wednesday, April 3, 2002, at 05:43 , email@hidden wrote:
Is it necessary to release (autorelease) objects that are in the main(
)
function if they are to span the duration of the application? They are
going
to be destroyed upon exit of the application anyhow, so is it necessary to
create a NSAutorelease pool for them or release them?
First, I guess you should not generally do anything in main unless you
have *pretty* strong reasons.
Second, you don't need to release those objects; the problem is that
_autorelase_ can't know that (the object will actually not be released at
all) and thus is searching for an appropriate pool.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.