[Patches] [ python-Patches-414492 ] adds a gc.get_generation function

noreply@sourceforge.net noreply@sourceforge.net
Sun, 08 Apr 2001 21:32:33 -0700


Patches item #414492, was updated on 2001-04-07 00:33
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=414492&group_id=5470

Category: core (C code)
Group: None
Status: Open
Priority: 5
Submitted By: Gregory P. Smith (greg)
>Assigned to: Neil Schemenauer (nascheme)
Summary: adds a gc.get_generation function

Initial Comment:
gc.get_generation(num) added by this patch allows you
to get a
list of all objects in a given garbage collector
generation.

I wrote this while trying to debug a memory leak so
that I could peek at what types of objects were
remaining allocated but never freed.

Looking through the patches I see another similarish
patch that allow for searching the collection lists for
references to a particular thing or set of things. 
interesting.

Is it useful?  Yes and no.  I still haven't found the
memory leak.  But I know what objects are consuming it
so I can narrow my search through to code to find how
they are remaining referenced.

as a side note, there's not much point in the
generation number parameter to this method, 2 is the
only generation really worth examining.

This or something like it would be nice to see in a
future python gc module as a debugging aid.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=414492&group_id=5470