|
libcomps ..
|
COMPS memory management(reference counter) file. More...
#include <stdlib.h>#include <string.h>#include <signal.h>Go to the source code of this file.
Data Structures | |
| struct | COMPS_RefC |
Functions | |
| COMPS_RefC * | comps_refc_create (void *obj, void(*destructor)(void *)) |
| void | comps_refc_destroy (COMPS_RefC *refc) |
| void | comps_refc_destroy_v (void *refc) |
| void | comps_refc_decref (COMPS_RefC *refc) |
| void | comps_refc_incref (COMPS_RefC *refc) |
COMPS memory management(reference counter) file.
Details.
| COMPS_RefC * comps_refc_create | ( | void * | obj, |
| void(*)(void *) | destructor ) |
reference counter constructor
|
inline |
alias for comps_refc_destroy
| void comps_refc_destroy | ( | COMPS_RefC * | refc | ) |
if ref counter equals zero destroy holded object and ref counter object itself, otherwise decrement counter
|
inline |
alias with void argument
|
inline |
increment reference counter by 1