• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Premature _NSAutoreleaseNoPool() warnings -And more
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
References: 
 >Re: Premature _NSAutoreleaseNoPool() warnings -And more (From: email@hidden)

  • Prev by Date: Strange Error when importing talkd.h
  • Next by Date: Re: Malloc()
  • Previous by thread: Re: Premature _NSAutoreleaseNoPool() warnings -And more
  • Next by thread: about kernel's subcomponents...
  • Index(es):
    • Date
    • Thread