Skip to content
napi-bindings

Search

Search pages, projects and the Node-API reference

Browse Node-APIshow

napi_reference_unref

functionv1js_native_api.h

This API decrements the reference count for the reference passed in and returns the resulting reference count.

NAPI_EXTERN napi_status napi_reference_unref(napi_env env,
                                             napi_ref ref,
                                             uint32_t* result);
  • [in] env: The environment that the API is invoked under.
  • [in] ref: napi_ref for which the reference count will be decremented.
  • [out] result: The new reference count.

Returns napi_ok if the API succeeded.

This API decrements the reference count for the reference passed in and returns the resulting reference count.

View in the official Node.js documentation