Re: menu madness with retain count
Re: menu madness with retain count
- Subject: Re: menu madness with retain count
- From: "Gary L. Wade" <email@hidden>
- Date: Tue, 27 Apr 2010 14:32:24 -0700
- Thread-topic: menu madness with retain count
On 04/27/2010 2:27 PM, "Shawn Erickson" <email@hidden> wrote:
> On Tue, Apr 27, 2010 at 2:22 PM, Gary L. Wade
> <email@hidden> wrote:
>
>> Yes, but how would you use those to determine why an Apple framework now
>> chooses to retain a delegate (I'm referring to one particular one I
>> discovered), thereby causing a retain cycle? It's not a memory leak in the
>> sense that Instruments or leaks would ever catch it.
>
> If you use the Object Allocations template (with retain tracking
> enabled) in Instruments then yes you can track down those type of
> issues easily ... far more easily then trying to probe retainCount in
> code yourself. I likely have use Instruments to track down every
> conceivable problem that may make you want to look at retainCount...
> you don't have to modify any code either.
>
>> Calling -retainCount immediately before and after the -setDelegate call is
>> pretty much the only
>> way.
>
> Simply not true.
>
> -Shawn
That's how I found the cause of Apple's bug, but I verified what I was
seeing by using -retainCount before and after, so yes, that simply is true.
_______________________________________________
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