[pygtk] Problem with the GC starting in the middle of _wrap_gtk_window_list_toplevels
Tim Evans
t.evans at aranz.com
Mon Mar 9 10:58:29 WST 2009
Laszlo Pandy wrote:
> Is the gtk.gdk.lock unnecessary? My understanding is that if you use
> timeout_add the callback will happen as an event in the mainloop. ie.
> it won't happen spontaneously in the middle of some other code unless
> gtk.main_iteration() is explicitly called.
>
> So wouldn't calling gc.collect() from the callback without the lock
> server the same purpose, or am I misunderstanding something?
It may not be necessary, I just had it there for extra safety. Garbage
collection can, or at least has in the past, trigger some strange things
to happen in PyGTK, including actual window operations I think.
Our app crashes without this hack, and previous versions would lock up.
I haven't had time to properly investigate the cause.
--
Tim Evans
Applied Research Associates NZ
http://www.aranz.com/
More information about the pygtk
mailing list