I found the last leak exercised by your example. The window was keeping
around a reference to the file selector dialog, creating a cyclical
reference. Cyclical references containing Gtk objects can not be
cleaned up by the Python garbage selector. By creating the file
selector on-the-fly,
Mike,
Yes i'm using a more complicated program to batch produce images. Through
more investigation i think it's not just the close function, any repeat call
of pylab seems to have similar problem. Thanks for looking into it, i will
try the Agg backend and see if that works out.
Cheers,
Jon.
Can you provide more information about the platform and backend that you
are using?
D2Hitman wrote:
I am getting a memory leak when i am using the pylab.close() function. I am
running matplotlib-0.98.3. It happens in a very simple script such as:
#!/usr/bin/python
import time
import pylab
Michael Droettboom wrote:
Can you provide more information about the platform and backend that you
are using?
Mike,
I was able to reproduce this with my ubuntu 8.10, gtkagg backend. I ran
the code via cut and paste with the stock python interpreter, not
ipython. I did not measure the
Ok. Thanks, I'll look into it. Just wanted to rule out that this
wasn't the known Gtk memory leak with old versions of Gtk before
devoting time to it.
Cheers,
Mike
Eric Firing wrote:
Michael Droettboom wrote:
Can you provide more information about the platform and backend that
you are
openSUSE 11.0 (x86_64) KDE 3.5.9 release 49.1 with GTKAgg backend
Michael Droettboom-3 wrote:
Can you provide more information about the platform and backend that you
are using?
D2Hitman wrote:
I am getting a memory leak when i am using the pylab.close() function. I
am
running
I'm not at the bottom of this yet, but thought I'd share my progress so
far --
It is leaking actual Python references (meaning len(gc.get_objects()) is
increasing). So it's not a malloc/free pair.
Seems to be Gtk-specific. (Both GtkAgg and Gtk). Other backends are
unaffected (Qt4 has some
I am getting a memory leak when i am using the pylab.close() function. I am
running matplotlib-0.98.3. It happens in a very simple script such as:
#!/usr/bin/python
import time
import pylab
while True:
time.sleep(1)
print 'calling pylab'
pylab.box()
pylab.close()
Every close