• 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: release check
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: release check


  • Subject: Re: release check
  • From: John Stiles <email@hidden>
  • Date: Wed, 14 Mar 2007 17:05:51 -0700

On Mar 14, 2007, at 4:53 PM, Uli Kusterer wrote:

Am 14.03.2007 um 23:24 schrieb John Stiles:
The original question has merit, though. It's nice to have warnings pop up at app quit if you accidentally forget a -release somewhere. We all make mistakes.

I doubt this is possible in Cocoa as it is currently implemented. For example, the Cocoa framework doesn't release several singletons (the most prominent of which are the application delegate and the other objects in the MainMenu.nib). So, pretty much every app will have a good number of "leaks" on exit.


Of course those are irrelevant in the end, because the application's memory will be torn down anyway, but it's a bunch of work to detect what objects are intentional leaks (e.g. not just the app delegate, but also all objects "hanging off of it").

Well, yes; the system is leaking a known set of objects, so you'd need to manually filter out some system objects. Not too pretty.


And now that you say this, I also vaguely remember something about how AppKit actually turns off "release" once the app starts quitting in order to speed up performance. The upshot is the apps quit more quickly but you can't rely on putting custom behaviors in dealloc if you want them to trigger on app quit—but it would also have serious repercussions for this usage as well. You'd have to work around that somehow. Perhaps the performance tools know how to disable that behavior, though.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: 
 >release check (From: "Ahmet Taha Sakar" <email@hidden>)
 >Re: release check (From: "I. Savant" <email@hidden>)
 >Re: release check (From: "I. Savant" <email@hidden>)
 >Re: release check (From: John Stiles <email@hidden>)
 >Re: release check (From: Uli Kusterer <email@hidden>)

  • Prev by Date: Re: release check
  • Next by Date: Re: release check
  • Previous by thread: Re: release check
  • Next by thread: Re: release check
  • Index(es):
    • Date
    • Thread