bdb112 skrev:
Summary:

It is not straightforward to avoid memory leaks/consumption in pylab.
If we define
x = arange(1e6)     # adjust size to make the increment visible, yet
fast enough to plot
# then repetition of
plot(x,hold=0)   # consumes increasing memory according to ubuntu
system monitor
[...]

I do not know what closing the window does, but in my programs, running on debian and opensuse, I found that explicitly calling close() solved my memory leaks with matplotlib.

3/ Are there python/matplotlib memory management tuning parameters I
can tweak?

You could try to import gc, and then call gc.collect() after each call to close().

docs at: http://docs.python.org/library/gc.html

Hope it helps

/ johan

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to