Can anyone tell me why, when running this script, the size of this process 
(measured by top) keeps increasing? I would expect after the end of 
setup_window() evertything created within it would be destroyed there, or 
soon after. This does not appear to be happening and there are no 
uncollectable objects. Any clues would be greatly appreciated.

I'm running pygtk on Debian unstable:

python 2.2.101
pygtk 1.99.16

I get the same results with all other versions of Python/PyGTK I have.

#!/usr/bin/python2.3

import pygtk
pygtk.require('2.0')

import gc, gtk.glade

def setup_window():
    xml = gtk.glade.XML('test2.glade')
    window2 = xml.get_widget('window1')
    window2.destroy()

if __name__=="__main__":
    gc.set_debug(gc.DEBUG_UNCOLLECTABLE)
    i = 0
    try:
        while 1:
            setup_window()
            print gc.garbage
            gc.collect()
            i += 1
    except KeyboardInterrupt:
        print gc.collect()
        print i

_______________________________________________
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