• 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: static objects "autoreleased with no pool in place - just leaking"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: static objects "autoreleased with no pool in place - just leaking"


  • Subject: Re: static objects "autoreleased with no pool in place - just leaking"
  • From: j o a r <email@hidden>
  • Date: Fri, 13 Feb 2004 07:51:31 +0100

I don't think that you are interpreting the warning messages correctly.
Static variables doesn't usually cause messages like these. Where did
you get the idea that your static variables were involved? Are you
spawning any new threads in your code? If so, that's where you should
be adding your additional autorelease pools.

j o a r

On 2004-02-13, at 07.05, m wrote:

> I have a number of places where I have static instances of things like
> NSStrings. These appear to be causing warnings like this:
>
> *** _NSAutoreleaseNoPool(): Object 0x1136ff0 of class NSCFString
> autoreleased with no pool in place - just leaking
>
> I know that objects instantiated without an autorelease pool in place
> will trigger this warning, but there must be a better way to handle
> this than instantiating a static autorelease pool in every source file
> that has static objects in it.
>
> Note that instantiating an autorelease pool in main() doesn't help
> since statics are setup before main() is called.

[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.

  • Follow-Ups:
    • Re: static objects "autoreleased with no pool in place - just leaking"
      • From: m <email@hidden>
    • Re: static objects "autoreleased with no pool in place - just leaking"
      • From: m <email@hidden>
References: 
 >static objects "autoreleased with no pool in place - just leaking" (From: m <email@hidden>)

  • Prev by Date: static objects "autoreleased with no pool in place - just leaking"
  • Next by Date: Re: DictionaryWithContentsOfURL
  • Previous by thread: static objects "autoreleased with no pool in place - just leaking"
  • Next by thread: Re: static objects "autoreleased with no pool in place - just leaking"
  • Index(es):
    • Date
    • Thread