napi_finalize
callbackv1js_native_api.hFunction pointer type for add-on provided function that allow the user to schedule a group of calls to Node-APIs in response to a garbage collection event, after the garbage collection cycle has completed.
Function pointer type for add-on provided function that allow the user to
schedule a group of calls to Node-APIs in response to a garbage collection
event, after the garbage collection cycle has completed. These function
pointers can be used with node_api_post_finalizer.
typedef void (*napi_finalize)(napi_env env,
void* finalize_data,
void* finalize_hint);
Change History:
-
experimental (
NAPI_EXPERIMENTALis defined):A function of this type may no longer be used as a finalizer, except with
node_api_post_finalizer.node_api_basic_finalizemust be used instead. This feature can be turned off by definingNODE_API_EXPERIMENTAL_BASIC_ENV_OPT_OUT.