Gdome2 Reference Manual
<<< Previous Page | Home | Up |

# Module Tree Garbage Collector

## Name

Module Tree Garbage Collector -- Structures and APIs

## Synopsis

    int         gdome_treegc_livenodes          (GdomeNode *node);
    void        gdome_treegc_addNode            (GdomeNode *node);
    void        gdome_treegc_delNode            (GdomeNode *node);
    void        gdome_treegc_invalidateNode     (GdomeNode *node);

## Description

This is module is internally used to manage the number of gdome2 live references. Externally you can use this module to test the number of live references in your Document with gdome_treegc_livenodes() function.

## Details

### gdome_treegc_livenodes ()

    int         gdome_treegc_livenodes          (GdomeNode *node);

`node` : | a node in the Document main tree
Returns : | the number of live nodes in the Document main tree.

### gdome_treegc_addNode ()

    void        gdome_treegc_addNode            (GdomeNode *node);

Increase the livenodes field

`node` : | the wrapper to register

### gdome_treegc_delNode ()

    void        gdome_treegc_delNode            (GdomeNode *node);

Decrease the livenodes field. If the field reaches zero (that is, there are no more live wrappers) free the whole document tree

`node` : | the wrapper to un-register

### gdome_treegc_invalidateNode ()

    void        gdome_treegc_invalidateNode     (GdomeNode *node);

Set the n field of the wrapper to NULL and decrease the livenode field of the document

`node` : | the wrapper to invalidate

<<< Previous Page | Home | Up |
Module Private List |