[Chicago-talk] linked list of object

Andy Lester andy at petdance.com
Wed Nov 9 12:57:00 PST 2005


On Wed, Nov 09, 2005 at 02:36:35PM -0600, Andy_Bach at wiwb.uscourts.gov (Andy_Bach at wiwb.uscourts.gov) wrote:
> (yes, the next() method returns the next object).  Just looking at some 
> code where they undef() the global pointer before appending a new list and 
> got to wondering if GC would be then able to recover the 'orphaned' 
> objects.  The first on the list won't have an refs so it can go and so the 
> 2nd ... etc.  Just wondering if this *not* a good idea or what a way to 
> examine the memory overhead.

As long as they're not linking to each other in a circle, then yes, GC
should pick 'em all up.

xoxo,
Andy

-- 
Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance


More information about the Chicago-talk mailing list