• 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: Memory not being released in a timely manner
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory not being released in a timely manner


  • Subject: Re: Memory not being released in a timely manner
  • From: Greg Parker <email@hidden>
  • Date: Thu, 06 Jun 2013 14:13:26 -0700

On Jun 6, 2013, at 4:41 AM, Jonathan Taylor <email@hidden> wrote:
> As far as I can see, the Allocations tool does not report memory that is pending release from an autorelease pool. It would be interesting to know if there was a way of monitoring that. Re your suggestion about wrapping code with my own autorelease pools, I have done so but I am pretty sure the movie generation APIs that I am using launch their own threads, ones that I don't have control over. Without being able to see exactly what allocations are still pending release, I can't be sure, but I am as certain as I can be that that's where the memory-pending-autorelease must be accumulating.

The Allocations instrument should report objects with pending autoreleases as ordinary live objects. (Note that many objects with retain count == pending autorelease count will be retained again before the autorelease pool pops.)

In OS X 10.8 and iOS 6 simulator, you can set environment variable OBJC_PRINT_POOL_HIGHWATER=YES to get debugging logs of the autorelease pool high-water mark on each thread. This can detect code that accumulates lots of autorelease garbage without spinning any pools. (The high-water mark is not checked until the pool is popped, so you'd have to actually finish the work to see the result.)


--
Greg Parker     email@hidden     Runtime Wrangler



_______________________________________________

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: Memory not being released in a timely manner
      • From: Jonathan Taylor <email@hidden>
References: 
 >Memory not being released in a timely manner (From: Jonathan Taylor <email@hidden>)
 >Re: Memory not being released in a timely manner (From: Jeff Johnson <email@hidden>)
 >Re: Memory not being released in a timely manner (From: Jens Alfke <email@hidden>)
 >Re: Memory not being released in a timely manner (From: Jonathan Taylor <email@hidden>)

  • Prev by Date: Re:RE: DETERMINE LOAD PATH OF LINKED FRAMEWORK AT RUNTIME
  • Next by Date: Re: Is container migration manifest required to access 3rd party file in ~/Library/Preferences from sandboxed Cocoa app in OS X 10.8 SDK?
  • Previous by thread: Re: Memory not being released in a timely manner
  • Next by thread: Re: Memory not being released in a timely manner
  • Index(es):
    • Date
    • Thread