Re: [Matplotlib-users] pylab.close()

2008-11-17 Thread Michael Droettboom
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,

Re: [Matplotlib-users] pylab.close()

2008-11-15 Thread D2Hitman
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.

Re: [Matplotlib-users] pylab.close()

2008-11-14 Thread Michael Droettboom
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

Re: [Matplotlib-users] pylab.close()

2008-11-14 Thread Eric Firing
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

Re: [Matplotlib-users] pylab.close()

2008-11-14 Thread Michael Droettboom
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

Re: [Matplotlib-users] pylab.close()

2008-11-14 Thread D2Hitman
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

Re: [Matplotlib-users] pylab.close()

2008-11-14 Thread Michael Droettboom
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

[Matplotlib-users] pylab.close()

2008-11-13 Thread D2Hitman
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