After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 129754 - memory leak with gtk.gdk.pixmap_foreign_new()
memory leak with gtk.gdk.pixmap_foreign_new()
Status: RESOLVED FIXED
Product: pygtk
Classification: Bindings
Component: general
1.99.x/2.0.x
Other Linux
: Normal normal
: ---
Assigned To: Python bindings maintainers
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2003-12-20 22:19 UTC by Martin Grimme
Modified: 2005-08-22 12:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
code to demonstrate the leak (210 bytes, text/plain)
2003-12-20 22:21 UTC, Martin Grimme
Details

Description Martin Grimme 2003-12-20 22:19:55 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()
Comment 1 Martin Grimme 2003-12-20 22:21:08 UTC
Created attachment 22605 [details]
code to demonstrate the leak
Comment 2 James Henstridge 2003-12-22 15:31:07 UTC
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.