• 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: 14799 expected memory Leaks in Cocoa.framework?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 14799 expected memory Leaks in Cocoa.framework?


  • Subject: Re: 14799 expected memory Leaks in Cocoa.framework?
  • From: Ken Thomases <email@hidden>
  • Date: Wed, 16 Jan 2013 03:42:37 -0600

On Jan 15, 2013, at 3:30 PM, Warren Postma wrote:

> I have used memory-profiler tools on other platforms and languages, and
> most have a concept of "registering expected memory leaks".  I haven't seen
> any indication that Instruments knows that Cocoa.framework has expected
> memory leaks, nor any way to force those
> expected memory leaks to be cleaned up, perhaps as an #ifdef block of code,
> to be used when you want to simplify memory leak profiling only.
>
> I'm a relatively new user of XCode and relatively new to Cocoa programming,
> although I have dabbled in Cocoa and Mac OS X programming back when it
> was *Project
> Builder *in the pre-XCode days.
>
> I posted this question on StackOverflow today:
>
> http://stackoverflow.com/questions/14346955/empty-new-cocoa-mac-os-x-application-leaks-14799-items-right-out-of-the-box-in
>
> In short, it feels to me like I'm drowning in "too much information" from
> Instruments, which tells me even about the framework leaks that are
> probably expected, and "no information at all" from the Static Analysis
> features.
> I feel like I probably have missed some important documentation somewhere
> that would enlighten me.

It looks your StackOverflow post has received several good responses by this point.  In summary, the most important thing is that you were looking at all still-living objects at the point of application termination rather than at leaks.  Also, folks explained that Cocoa makes no attempt to systematically tear down the object graph on application termination.

I just added my own response referring to this place <https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmRules.html#//apple_ref/doc/uid/20000994-SW2> in Apple's documentation, which says:

> When an application terminates, objects may not be sent a dealloc message. Because the process’s memory is automatically cleared on exit, it is more efficient simply to allow the operating system to clean up resources than to invoke all the memory management methods.

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


References: 
 >14799 expected memory Leaks in Cocoa.framework? (From: Warren Postma <email@hidden>)

  • Prev by Date: 14799 expected memory Leaks in Cocoa.framework?
  • Next by Date: Re: AppleScript in Sandboxed App
  • Previous by thread: 14799 expected memory Leaks in Cocoa.framework?
  • Next by thread: Re: 14799 expected memory Leaks in Cocoa.framework?
  • Index(es):
    • Date
    • Thread