MateComponentRunningContext

## MateComponentRunningContext MateComponentRunningContext — a live object tracker |

## Synopsis

                        MateComponentRunningContext;
                        MateComponentRunningContextClass;
    MateComponentObject *      matecomponent_running_context_new          (void);
    void                matecomponent_running_context_ignore_object
                                                            (CORBA_Object object);
    void                matecomponent_running_context_at_exit_unref
                                                            (CORBA_Object object);

## Description

MateComponentRunningContext implements the `MateComponent::RunningContext` IDL interface, depicted in Figure 1, “The MateComponent::RunningContext interface”.

Figure 1. The MateComponent::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.

MateComponentRunningContext is a singleton. There is at most one instance running at all times. All MateComponentObject'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

### MateComponentRunningContext

    typedef struct {
    	MateComponentObject parent;

    	MateComponentRunningContextPrivate *priv;
    } MateComponentRunningContext;

the running context data

### MateComponentRunningContextClass

    typedef struct {
    	MateComponentObjectClass parent;

    	POA_MateComponent_RunningContext__epv epv;

    	void (*last_unref) (void);
    } MateComponentRunningContextClass;

the running context class

### matecomponent_running_context_new ()

    MateComponentObject *      matecomponent_running_context_new          (void);

Returns : |

### matecomponent_running_context_ignore_object ()

    void                matecomponent_running_context_ignore_object
                                                            (CORBA_Object object);

`object` : |

### matecomponent_running_context_at_exit_unref ()

    void                matecomponent_running_context_at_exit_unref
                                                            (CORBA_Object object);

`object` : |

## See Also

MateComponentGenericFactory(3)