• 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: menu madness with retain count
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: menu madness with retain count


  • Subject: Re: menu madness with retain count
  • From: Jack Nutting <email@hidden>
  • Date: Tue, 27 Apr 2010 23:25:07 +0200

On Tue, Apr 27, 2010 at 11:12 PM, Bill Bumgarner <email@hidden> wrote:
>
> The combination of leaks, zombies, heap, and malloc stack logging are much *much* more powerful and effective than trying to debug a leak, over-retain or under-retain with -retainCount.
>
> b.bum

Hear, hear.  I haven't called retainCount in well over a decade. Not
as a matter of principle, but as a result of learned experience and
reasoning: attempting to track down memory leaks or premature deallocs
by examining the value of retainCount *does*not*work*.  The value it
returns for any framework class is only meaningful, necessarily,
within that framework or a framework it's using; The only time that
retainCount can be assumed to have any meaningful value to you as a
developer is in case you have your own class that overrides all the
memory-management methods and handles them completely on its own, so
that you can e.g. do your own caching of objects you create.

--
// jack
// http://nuthole.com
// http://learncocoa.org
_______________________________________________

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: 
 >Re: menu madness with retain count (From: "Gary L. Wade" <email@hidden>)
 >Re: menu madness with retain count (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: Re: menu madness with retain count
  • Next by Date: Re: menu madness with retain count
  • Previous by thread: Re: menu madness with retain count
  • Next by thread: Re: menu madness with retain count
  • Index(es):
    • Date
    • Thread