I had no trouble reproducing this on my Ubuntu Feisty box.

It turns out that wxPython leaks a dictionary for every object whose
class subclasses a Wx class.  There is a fix for this that made it into
wxPython-2.8.3.0:

http://cvs.wxwidgets.org/viewcvs.cgi/wxWidgets/wxPython/src/helpers.cpp.diff?r1=1.145&r2=1.145.4.1
 


I have verified this on my source-built wxPython-2.8.4.0.  If I remove
this line, I can reproduce the reference leak.

** I would recommend that anyone using a wxPython-2.8.x prior to
wxPython-2.8.4 should upgrade.  There are binary packages available for
a number of distributions on wxpython.org. **

As an aside, I filed a bug for this on Ubuntu launchpad.  I don't know
if this qualifies for the kind of fix they would normally make as a
maintenance release.  Promisingly, my bug was confirmed within about
five minutes of filing it.

https://bugs.launchpad.net/ubuntu/+source/wxwidgets2.8/+bug/124381

Cheers,
Mike

Eric Firing wrote:
> Michael Droettboom wrote:
>> Interesting...
>>
>> When you get a chance, would you mind running the attached script?  
>> This is how I was finding object leaks before.  It takes a single 
>> commandline argument that is the number of iterations.  Can you send 
>> me the outputs from 1 and 2 iterations?  That way we should be able 
>> to see what type of object is being leaked, which is a good first step.
>
> [EMAIL PROTECTED]:~/programs/py/mpl/tests$ python memleak_gui_wx.py 1
> 75891 76010
> *** <class 'wx._core.PySimpleApp'>
> *** <class 'wx._core._wxPyDeadObject'>
>
> uncollectable list: []
>
> [EMAIL PROTECTED]:~/programs/py/mpl/tests$ python memleak_gui_wx.py 2
> GnomePrintCupsPlugin-Message: The ppd file for the CUPS printer 
> Dell424 could not be loaded.
> GnomePrintCupsPlugin-Message: The ppd file for the CUPS printer pslj4m 
> could not be loaded.
> 75891 76014
> *** <class 'wx._core.PySimpleApp'>
> *** <class 'wx._core._wxPyDeadObject'>
>
> uncollectable list: []
>
>
> Eric
>



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to