• 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: Ken Thomases <email@hidden>
  • Date: Wed, 16 Oct 2013 00:28:17 -0500

On Oct 15, 2013, at 11:54 PM, Jens Alfke wrote:

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

Not if that occurs within a surrounding autorelease pool's lifetime.  Autorelease pools are on a sort of stack and releasing one pops all of the ones above it on the stack even if they were not properly released themselves.

Regarding the general issue of the mystery objects that are still alive, there's little point in speculating.  Look at the object's history in the Allocations instrument to see not only where it was allocated but all retains, releases, and autoreleases.  Correlate those until you see which code had a responsibility to release but failed to.

Regards,
Ken


_______________________________________________

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>
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: Core Data with ODBC databases?
  • Next by Date: Re: Fastest way to do screen captures on OSX ?
  • Previous by thread: Re: Cocoa class extension best practice
  • Next by thread: Re: Cocoa class extension best practice
  • Index(es):
    • Date
    • Thread