Re: I'm losing my memory (GC & NSImageView)
Re: I'm losing my memory (GC & NSImageView)
- Subject: Re: I'm losing my memory (GC & NSImageView)
- From: Rob Keniger <email@hidden>
- Date: Mon, 5 Nov 2007 14:15:24 +1000
On 05/11/2007, at 2:21 AM, Bill Bumgarner wrote:
GDB includes tools for examining the object graph and figuring out
what is keeping your objects around for too darned long. Once you
find an object that is sticking around for too long, take the
address and:
info gc-references <ADDRESS/SYMBOL>
Or:
info gc-roots <ADDRESS/SYMBOL>
In particular, gc-roots will tell you what globals (including stack
references, if any) are rooting the object; are directly or
indirectly referencing the object and keeping it alive.
This gets my vote for most useful tip of the month. I don't remember
this being mentioned at the WWDC GC talk. I also can find no reference
to it in the Documentation which I find astonishing as it is really
incredibly useful for debugging garbage collection problems.
I have already used this to find the source of a leak that has been
causing me headaches for a month.
Thanks, Bill.
--
Rob Keniger
_______________________________________________
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