On Jun 6, 2013, at 4:41 AM, Jonathan Taylor <jonathan.tay...@glasgow.ac.uk> 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 gpak...@apple.com Runtime Wrangler _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com