Re: menu madness with retain count
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