Eric, It turns out that the key difference is in pygobject. I was using 2.13.2 (from source) here at work, and Ubuntu Feisty currently ships 2.12.3. 2.13.x is an unstable branch, of course, (gnome-related packages follow the even/odd versioning scheme), so I shouldn't have been using it to test with in the first place...
...however, there are only about 40 patches between 2.12.3 and 2.13.2. Two of them are very crucial memory leak patches: http://svn.gnome.org/viewcvs/pygobject?limit_changes=100&view=revision&revision=653 http://svn.gnome.org/viewcvs/pygobject?limit_changes=100&view=revision&revision=642 When I patched 2.12.3 against these patches, the Python object leaks go away. There may be workarounds matplotlib can make -- I'll look into that now. Hopefully the workarounds won't be too problematic -- I would hate to complicate matplotlib code for the sake of something that should resolve itself in the next Gnome release cycle... I updated the memleak_gui.py script to display the pygobject/glib versions as well when testing the gtk backend. Cheers, Mike Michael Droettboom wrote: > 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. >>> >> And here is the result of the script modified for gtk: >> >> [EMAIL PROTECTED]:~/programs/py/mpl/tests$ python memleak_gui_gtk.py 1 >> 55352 55417 >> *** <type 'gtk.gdk.Colormap'> >> *** <class 'matplotlib.backends.backend_gtk.FileChooserDialog'> >> *** <class 'gtk._gtk.WidgetFlags'> >> *** <class 'gtk._gtk.WidgetFlags'> >> *** <type 'gtk.gdk.Window'> >> *** <class 'matplotlib.backends.backend_gtk.FigureCanvasGTK'> >> *** <class 'matplotlib.backends.backend_gtk.NavigationToolbar2GTK'> >> *** <type 'gtk.gdk.Pixmap'> >> *** <type 'gtk.Tooltips'> >> *** <type 'gtk.Label'> >> *** <type 'gtk.Window'> >> *** <type 'gtk.VBox'> >> >> uncollectable list: [] >> >> [EMAIL PROTECTED]:~/programs/py/mpl/tests$ python memleak_gui_gtk.py 2 >> 55352 55421 >> *** <type 'gtk.gdk.Colormap'> >> *** <class 'matplotlib.backends.backend_gtk.FileChooserDialog'> >> *** <class 'gtk._gtk.WidgetFlags'> >> *** <class 'gtk._gtk.WidgetFlags'> >> *** <type 'gtk.gdk.Window'> >> *** <class 'matplotlib.backends.backend_gtk.FileChooserDialog'> >> *** <class 'gtk._gtk.WidgetFlags'> >> *** <class 'gtk._gtk.WidgetFlags'> >> *** <type 'gtk.gdk.Window'> >> *** <class 'matplotlib.backends.backend_gtk.FigureCanvasGTK'> >> *** <class 'matplotlib.backends.backend_gtk.NavigationToolbar2GTK'> >> *** <type 'gtk.gdk.Pixmap'> >> *** <type 'gtk.Tooltips'> >> *** <type 'gtk.Label'> >> *** <type 'gtk.Window'> >> *** <type 'gtk.VBox'> >> >> 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 > > ------------------------------------------------------------------------- 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