GNOME Bugzilla – Bug 129754
memory leak with gtk.gdk.pixmap_foreign_new()
Last modified: 2005-08-22 12:43:53 UTC
PyGTK 2.0.0 and also CVS HEAD leak memory in gtk.gdk.pixmap_foreign_new(). See the example code. The number of uncollectable objects reported by the garbage collector grows with each call of pixmap_foreign_new(). import pygtk; pygtk.require("2.0") import gtk import gc gc.set_debug(gc.DEBUG_STATS) rootwin = gtk.gdk.get_default_root_window() while (1): pmap = gtk.gdk.pixmap_foreign_new(rootwin.xid) gc.collect()
Created attachment 22605 [details] code to demonstrate the leak
There were missing (caller-owns-return #t) lines in the defs for pixmap_foreign_new* and window_foreign_new*. I've fixed it up on HEAD and the branch now.