Yes, as of r5747 twinx (well, shared axes specifically) no longer leaks.

Manuel has discovered a seemingly generic leak that occurs when 
pyplot.close() is called and running a GUI backend.  I can confirm his 
results with the script he last sent.

Cheers,
Mike

Manuel Metz wrote:
> John Hunter wrote:
>> On Mon, Jul 14, 2008 at 3:05 PM, Michael Droettboom <[EMAIL PROTECTED]> 
>> wrote:
>>> I can confirm this.
>>>
>>> Commenting out "del Gcf.figs[num]" in Gcf.destroy (in 
>>> _pylab_helpers.py)
>>> also seems to resolve the leak.  But I have no idea why, so I won't
>>> commit it just yet.  I don't have much time to look deeper now.  Does
>>> anyone (who probably understands figure management better than me) have
>>> an idea what might cause this?
>>
>> Can you post the script you are using to test -- I am a little
>> confused from reading this thread by whether or not twinx is
>> implicated.  Also, I saw that you committed some changes vis-a-vis the
>> twinx leak
>>
>>   r5747 | mdboom | 2008-07-11 13:21:53 -0500 (Fri, 11 Jul 2008) | 2 
>> lines
>>
>>   Fix memory leak when using shared axes.
>>
>> so I thought that part was resolved already...
>>
>> JDH
>
> I use a modified version of the script Laurent Oget posted (see 
> attachment). Here is the output if I don't comment out PL.close(1).
>
> ~/python/test$ python looptest.py -dGTK
> 0 GC 69354 69354 0 13854
> 100 GC 84354 150 0 15163
> 200 GC 99354 150 0 16306
> 300 GC 114354 150 0 17364
> 400 GC 129354 150 0 18576
> ~/python/test$ python looptest.py -dTK
> 0 GC 69521 69521 0 14065
> 100 GC 84521 150 0 15444
> 200 GC 99521 150 0 16581
> 300 GC 114521 150 0 17719
> 400 GC 129521 150 0 18715
> ~/python/test$ python looptest.py -dPS
> 0 GC 59307 59307 0 7705
> 100 GC 59307 0 0 8037
> 200 GC 59307 0 0 8038
> 300 GC 59307 0 0 8038
> 400 GC 59307 0 0 8038
>
> (so for the window-less backend PS no objects are left)
>
> And now I commented out the line PL.close(1):
>
> ~/python/test$ python looptest.py -dGTK
> 0 GC 69379 69379 0 13855
> 100 GC 69379 0 0 14253
> 200 GC 69379 0 0 14253
> 300 GC 69379 0 0 14253
> 400 GC 69379 0 0 14252
>
> Manuel

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to