## BonoboRunningContext

BonoboRunningContext — a live object tracker

##

# Synopsis

    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);

## Object Hierarchy

      GObject
       +----BonoboObject
             +----BonoboRunningContext

## Signal Prototypes

    "last-unref"
                void        user_function      (BonoboRunningContext *bonoborunningcontext,
                                                gpointer user_data);

## Description

BonoboRunningContext implements the `Bonobo::RunningContext` IDL interface, depicted in Figure 1.

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.

## Details

### struct BonoboRunningContext

    struct BonoboRunningContext;

the running context data

### struct BonoboRunningContextClass

    struct BonoboRunningContextClass {

    	BonoboObjectClass parent;

    	POA_Bonobo_RunningContext__epv epv;

    	void (*last_unref) (void);
    };

the running context class

### bonobo_running_context_new ()

    BonoboObject* bonobo_running_context_new    (void);

Returns : |

### bonobo_running_context_ignore_object ()

    void        bonobo_running_context_ignore_object
                                                (CORBA_Object object);

`object` : |

### bonobo_running_context_at_exit_unref ()

    void        bonobo_running_context_at_exit_unref
                                                (CORBA_Object object);

`object` : |

## Signals

### The "last-unref" signal

    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.

## See Also

BonoboGenericFactory(3)