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
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 mails | Author | Date |
|---|---|---|
| Stuart Rogers | Nov 4, 16:10 | |
| Erik Buck | Nov 4, 16:51 | |
| Bill Bumgarner | Nov 4, 17:21 | |
| Stuart Rogers | Nov 4, 23:56 | |
| Uli Kusterer | Nov 5, 01:18 | |
| Rob Keniger | Nov 5, 05:15 | |
| Bill Bumgarner | Nov 5, 05:47 | |
| Stuart Rogers | Nov 5, 22:16 |






Cocoa mail archive

