[pygtk] destructors not getting called
N. French
nbm_clan at yahoo.com
Thu Aug 3 01:59:29 WST 2006
I have a class, we'll call it App, which inherits from gtk.Window. In
this class I have defined a destructor which takes care of some
hardware management. I also have some instances of assorted container
classes which need to have their destructors called. I assumed they
would be called at shutdown and everything would be happy. Here's what
I'm seeing:
1. The App class does not have __del__ called unless I explicitly call
it in my window destroy callback.
2. The container classes don't have __del__ called unless I explicitly
call it (from my App's destructor).
I tested the container classes separately and the destructors get
called just like you'd expect, which is why I'm thinking this has
something to do with GTK. Below is my startup code.
if __name__ == '__main__':
app = App()
app.show_all()
gtk.threads_enter()
gtk.main()
gtk.threads_leave()
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the pygtk
mailing list