Re: Memory not being released in a timely manner
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