• 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: Steve Mills <email@hidden>
  • Date: Wed, 16 Oct 2013 08:27:26 -0500

On Oct 15, 2013, at 23:54:56, Jens Alfke <email@hidden> wrote:

> 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.

If that was the case, we'd have all sorts of stuff leaking. I looked for all creations of NSAutoreleasePool and they all have releases. Even if an exception was being thrown and the release was missed, they're all in code that isn't being run in my test cases. Good thought though.

--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157



_______________________________________________

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


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>)
 >Re: Cocoa class extension best practice (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Core Data with ODBC databases?
  • Next by Date: Re: NSTextView without word wrap
  • Previous by thread: Re: Cocoa class extension best practice
  • Next by thread: Re: Cocoa class extension best practice
  • Index(es):
    • Date
    • Thread