Skip navigation.
 
mlRe: I'm losing my memory (GC & NSImageView)
FROM : Rob Keniger
DATE : Mon Nov 05 05:15:24 2007

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

Related mailsAuthorDate
mlI'm losing my memory (GC & NSImageView) Stuart Rogers Nov 4, 16:10
mlRe: I'm losing my memory (GC & NSImageView) Erik Buck Nov 4, 16:51
mlRe: I'm losing my memory (GC & NSImageView) Bill Bumgarner Nov 4, 17:21
mlRe: I'm losing my memory (GC & NSImageView) Stuart Rogers Nov 4, 23:56
mlRe: I'm losing my memory (GC & NSImageView) Uli Kusterer Nov 5, 01:18
mlRe: I'm losing my memory (GC & NSImageView) Rob Keniger Nov 5, 05:15
mlRe: I'm losing my memory (GC & NSImageView) Bill Bumgarner Nov 5, 05:47
mlRe: I'm losing my memory (GC & NSImageView) Stuart Rogers Nov 5, 22:16