This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gregory.p.smith
Recipients
Date 2001-04-07.07:33:46
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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.
History
Date User Action Args
2007-08-23 15:04:39adminlinkissue414492 messages
2007-08-23 15:04:39admincreate