Re: Cocoa class extension best practice
Re: Cocoa class extension best practice
- Subject: Re: Cocoa class extension best practice
- From: Jens Alfke <email@hidden>
- Date: Tue, 15 Oct 2013 21:54:56 -0700
On Oct 15, 2013, at 9:13 PM, Steve Mills <email@hidden> wrote:
> This is running our release target. Zombies is off. Am I just not reading this data correctly? These do NOT appear as leaks in the Leaks instrument, only as allocations in the Allocations instrument. If I run this particular code over and over, I can watch the app's memory footprint grow steadily, yet Leaks shows nothing out of the ordinary.
Then they’re not strictly speaking leaks — something is still pointing to them (and likely holding references to them.)
It might be an autorelease pool that isn’t getting drained, but the stack you showed is inside a call to -[NSMenu update] so presumably it’s on the main thread and there’s an autorelease pool present for the current event that will drain when it’s done.
Is it possible your code has called [NSAutoreleasePool new] someplace but not called -release on it when it’s done? That would have exactly this kind of effect — every autoreleased object would be stuck in memory but not shown as a leak.
—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