• 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: NSReleasePool issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSReleasePool issue


  • Subject: Re: NSReleasePool issue
  • From: Steve Christensen <email@hidden>
  • Date: Fri, 20 Jun 2014 09:32:48 -0700

My main() looks like this. Does yours specify an autorelease pool?

int main(int argc, char* argv[])
{
	@autoreleasepool
	{
		return UIApplicationMain(argc, argv, nil, @"MyDelegateClassName");
	}
}


On Jun 19, 2014, at 5:45 PM, Varun Chandramohan <email@hidden> wrote:

> I was playing around with OBJ_DEBUG_MISSING_POOL env variable and set it to YES. I was able to debug most of the issues in my code where I missed auto release pools. This is the last one remaining. However I am not sure where the leak is happening. It looks like NSApplicationMain, do that also need this auto release pool?
>
> objc[26109]: MISSING POOLS: Object 0x6180000410e0 of class NSUserDefaults autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
>
> (lldb) bt
>
> * thread #1: tid = 0x3d3c5f, 0x00007fff91da8604 libobjc.A.dylib`objc_autoreleaseNoPool, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
>    frame #0: 0x00007fff91da8604 libobjc.A.dylib`objc_autoreleaseNoPool
>    frame #1: 0x00007fff91d95488 libobjc.A.dylib`(anonymous namespace)::AutoreleasePoolPage::autoreleaseSlow(objc_object*) + 72
>    frame #2: 0x00007fff91da8781 libobjc.A.dylib`_objc_rootAutorelease2(objc_object*) + 75
>    frame #3: 0x00007fff895528a3 AppKit`_NSGetBoolAppConfig + 85
>    frame #4: 0x00007fff89571566 AppKit`-[NSApplication _installMemoryPressureDispatchSources] + 161
>    frame #5: 0x00007fff89565861 AppKit`-[NSApplication run] + 206
>    frame #6: 0x00007fff895507a3 AppKit`NSApplicationMain + 940
>  * frame #7: 0x0000000100002022 TOS`main(argc=3, argv=0x00007fff5fbffa90) + 34 at main.m:13

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: NSReleasePool issue
      • From: Sean McBride <email@hidden>
References: 
 >NSReleasePool issue (From: Varun Chandramohan <email@hidden>)

  • Prev by Date: Re: Send msg to object by nameed NSString;
  • Next by Date: Re: NSReleasePool issue
  • Previous by thread: NSReleasePool issue
  • Next by thread: Re: NSReleasePool issue
  • Index(es):
    • Date
    • Thread