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

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


  • Subject: static objects "autoreleased with no pool in place - just leaking"
  • From: m <email@hidden>
  • Date: Thu, 12 Feb 2004 22:05:49 -0800

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.

_murat
_______________________________________________
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: j o a r <email@hidden>
  • Prev by Date: -[NSTextView complete:] behavior with < 2 character word range
  • Next by Date: Re: static objects "autoreleased with no pool in place - just leaking"
  • Previous by thread: Re: -[NSTextView complete:] behavior with < 2 character word range
  • Next by thread: Re: static objects "autoreleased with no pool in place - just leaking"
  • Index(es):
    • Date
    • Thread