• 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: Varun Chandramohan <email@hidden>
  • Date: Wed, 25 Jun 2014 00:59:50 +0000
  • Thread-topic: NSReleasePool issue

Hi All,

Apple has notified that this a known bug and they have a duplicate of the bug I submitted regarding this issue. They closed my bug. I am not sure if bug numbers will benefit anyone in this forum, if so let me know ill post it.

Regards,
Varun

From: Jens Alfke <email@hidden<mailto:email@hidden>>
Date: Sunday, 22 June 2014 5:24 am
To: Kyle Sluder <email@hidden<mailto:email@hidden>>
Cc: Development <email@hidden<mailto:email@hidden>>, Cocoa-Dev List <email@hidden<mailto:email@hidden>>
Subject: Re: NSReleasePool issue


On Jun 21, 2014, at 11:16 AM, Kyle Sluder <email@hidden<mailto:email@hidden>> wrote:

The pool will never be drained, because NSApplicationMain never returns. There is no wasted work here.

But it's still true that any object autoreleased into that pool is effectively leaked. It just won't be visible as such to the 'leaks' tool or Instruments, because technically that outer autorelease pool still has a reference to it. Nor will you be able to get that warning about an object being autoreleased without a pool, which is another way to catch such a leak. So it seems that all this does is hide potential leaks from you.

NSApplicationMain needs to interact with user defaults in order to parse the command line. It's kind of unreasonable to expect Apple to eschew -autorelease in all code that can be called during startup.

Any code that runs at startup that uses autorelease should create its own temporary autorelease pool. There's apparently one such routine that doesn't: that's the actual bug here, and as I said, it should be reported to Apple.

-Jens

_______________________________________________

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


References: 
 >NSReleasePool issue (From: Varun Chandramohan <email@hidden>)
 >Re: NSReleasePool issue (From: Steve Christensen <email@hidden>)
 >Re: NSReleasePool issue (From: Sean McBride <email@hidden>)
 >RE: NSReleasePool issue (From: Varun Chandramohan <email@hidden>)
 >Re: NSReleasePool issue (From: Kyle Sluder <email@hidden>)
 >Re: NSReleasePool issue (From: Jens Alfke <email@hidden>)
 >Re: NSReleasePool issue (From: Kyle Sluder <email@hidden>)
 >Re: NSReleasePool issue (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: NSButton, Templates, images…
  • Next by Date: NSStrings to CStrings and hex encoding...
  • Previous by thread: Re: NSReleasePool issue
  • Next by thread: Re: NSReleasePool issue
  • Index(es):
    • Date
    • Thread