Dealing with outstanding timeout callbacks
- From: Braden McDaniel <braden endoframe com>
- To: "gtk-app-devel-list gnome org" <gtk-app-devel-list gnome org>
- Subject: Dealing with outstanding timeout callbacks
- Date: Sun, 21 Nov 2004 02:19:17 -0500
I'm writing a Mozilla plug-in which uses g_timeout_add to add a timeout callback
to drive an animation in a widget. In my widget's destroy function, I:
1. while (gtk_events_pending()) { gtk_main_iteration(); }
2. Check my stored timeout_id (returned from g_timeout_add): if it is nonzero,
call g_source_remove.
Yet, there is still an outstanding timeout callback. It runs after my widget is
destroyed, and of course crashes. What do I need to do to run or remove this
callback before my widget is destroyed?
--
Braden McDaniel e-mail: <braden endoframe com>
<http://endoframe.com> Jabber: <braden jabber org>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]