[Gc] Roots observed in GC stack with threads

skaller skaller at users.sourceforge.net
Tue Nov 27 10:56:01 PST 2007

On Mon, 2007-11-26 at 21:48 -0500, Lincoln Quirk wrote:

> The program is in a complex infinite loop which results in several
> allocations each iteration. The essence of it is that it's constructing
> a new node in a linked list on each iteration, but the head is being
> advanced as fast as the tail. I (fairly strongly) believe I'm updating
> any pointers to the old head, so that the old elements in the list
> should not be retained and the collector should properly collect it as
> execution continues.

Be good if you could give the actual data structure? You don't say
whether your linked list is doubly or singly linked.

If it is doubly linked you probably forgot to NULL out
the end note 'next' pointer, leaving the tail still reachable.

John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: https://felix.sf.net

More information about the Gc mailing list