The following program eats all memory because GDK pixbufs do not seem
to be garbage collected.

I have Python 2.2 and gdk-pixbuf-0.20.0

How is it that you get away with having NULL tp_dealloc destructors on
the wrapped types? Surely that needs to be changed to typename_unref
on all types?


import gtk
import gc
import sys

def get_picture():
    pixbuf = gtk.gdk.pixbuf_new_from_file("test.png")

gc.enable()
gc.set_debug(gc.DEBUG_LEAK|gc.DEBUG_STATS)
sys.stderr.write("gc thresholds %s,%s,%s\n"%gc.get_threshold())

while 1:
    get_picture()

    sys.stderr.write("%s junk objects out of %s, %s found\n"
                         % (len(gc.garbage),len(gc.get_objects()),gc.collect())
                         )


_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to