memory leak in PyTree

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


On Thu, 19 Apr 2001, Eugene Leitl wrote, stupidly:

> 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
  ^^^^^^^^^^^^^^^^^^
Um, it's the Generic Tree Object Viewer, of course.

> 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.

Btw, I've just managed to crash the Linux box by a click barrage on the
test4 button (I'm not sure which part of it, but it froze up for good). I
also just did a similiar test under NT 4.0, and the system took _an
eternity_ to shut down (about 5 min, or so). The task was essentially
totally irresponsive, and did not refresh the window at all.

> 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).

Btw, I managed to obtain Bobo eventually, so I'm happy to pass it on (you
all know it's unsupported, right? Use ZServer/Zope if you want supported
stuff), provided you can't find it and the Digital Creations folks don't
mind.

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

I.e., where a node has more than two children nodes. Lisp does it with
cons cells, so it should be doable in Python, too.






More information about the Python-list mailing list