node-addon-layer
C API For writing Node modules
|
Typedefs | |
typedef void(* | shim_weak_cb )(shim_val_t *, void *) |
Functions | |
shim_val_t * | shim_persistent_new (shim_ctx_t *ctx, shim_val_t *val) |
void | shim_persistent_dispose (shim_val_t *val) |
void | shim_obj_make_weak (shim_ctx_t *ctx, shim_val_t *val, void *data, shim_weak_cb cb) |
void | shim_obj_clear_weak (shim_val_t *val) |
Methods for persistents
typedef void(* shim_weak_cb)(shim_val_t *, void *) |
Callback fired when a peristent is about to be collected
void shim_obj_clear_weak | ( | shim_val_t * | val) |
Make a persistent object strong
val | The given persistent |
void shim_obj_make_weak | ( | shim_ctx_t * | ctx, |
shim_val_t * | val, | ||
void * | data, | ||
shim_weak_cb | weak_cb | ||
) |
Make a persistent value weak
ctx | Currently executing context |
val | Persistent to make weak |
data | Arbitrary data to pass to the weak_cb |
weak_cb | Callback that will be called when the object is about to be free |
void shim_persistent_dispose | ( | shim_val_t * | val) |
Dispose a perisstent value
val | The persistent to dispose |
shim_val_t* shim_persistent_new | ( | shim_ctx_t * | ctx, |
shim_val_t * | val | ||
) |
Make an existing value persistent
ctx | The currently executing context |
val | The the given object |