• 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: Cocoa class extension best practice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Cocoa class extension best practice
      • From: Steve Mills <email@hidden>
    • Re: Cocoa class extension best practice
      • From: Ken Thomases <email@hidden>
References: 
 >Cocoa class extension best practice (From: Steve Mills <email@hidden>)
 >Re: Cocoa class extension best practice (From: Kyle Sluder <email@hidden>)
 >Re: Cocoa class extension best practice (From: Steve Mills <email@hidden>)
 >Re: Cocoa class extension best practice (From: Graham Cox <email@hidden>)
 >Re: Cocoa class extension best practice (From: "Mills, Steve" <email@hidden>)
 >Re: Cocoa class extension best practice (From: Graham Cox <email@hidden>)
 >Re: Cocoa class extension best practice (From: Steve Mills <email@hidden>)

  • Prev by Date: Re: Cocoa class extension best practice
  • Next by Date: How do I find deactivated fonts?
  • Previous by thread: Re: Cocoa class extension best practice
  • Next by thread: Re: Cocoa class extension best practice
  • Index(es):
    • Date
    • Thread