![]() | ![]() | ![]() | Libbonobo Reference Manual | ![]() |
---|
BonoboRunningContext — a live object tracker
struct BonoboRunningContext; struct BonoboRunningContextClass; BonoboObject* bonobo_running_context_new (void); void bonobo_running_context_ignore_object (CORBA_Object object); void bonobo_running_context_at_exit_unref (CORBA_Object object);
"last-unref" void user_function (BonoboRunningContext *bonoborunningcontext, gpointer user_data);
BonoboRunningContext implements the Bonobo::RunningContext IDL interface, depicted in Figure 1, “The Bonobo::RunningContext interface”.
The purpose of this object is to keep track of currently running objects. This is useful in, for example, exe type factories, in order to know when it is safe to quit from the main loop.
BonoboRunningContext is a singleton. There is at most one instance running at all times. All BonoboObject's are automatically registered with the running context as part of their normal initialization procedure.
To find out when all objects have been destroyed, just connect a handler to the "last-unref" signal.
struct BonoboRunningContextClass { BonoboObjectClass parent; POA_Bonobo_RunningContext__epv epv; void (*last_unref) (void); };
the running context class
void bonobo_running_context_ignore_object (CORBA_Object object);
object : |
void user_function (BonoboRunningContext *bonoborunningcontext, gpointer user_data);
bonoborunningcontext : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
<< bonobo-main | bonobo-shutdown >> |