memory leak in PyTree

Eugene Leitl Eugene.Leitl at lrz.uni-muenchen.de
Thu Apr 19 09:07:09 EDT 2001


I've bought the wonderful Programming Python (2nd ed.) ORA book by Mark
Lutz (thanks Mark!) yesterday and right now I'm playing with the generic
tree object PyTree (pp.  1020-1032). I'm using Python 2.1b2 under Linux
2.2.

When I hit the button generating a 20 node random tree for a few 100
times, I notice a monotonous decrease in available memory (as reported by
top). When I terminate the program after it ate about 50 MBytes of memory,
it takes a long while to shut down, I can watch the widgets vanishing from
the canvass taking half a minute, or so.

Is this a "feature" of TkInter, or of the tree code? (I want to use
similiar code serverside using Medusa/Bobo, so it better not be leaky).

And, btw, does anybody have code that lets me create trees other than
binary?

TIA,

-- Eugene





More information about the Python-list mailing list