napi_reference_unref

Function napi_reference_unref 

Source
pub unsafe extern "C" fn napi_reference_unref(
    env: napi_env,
    ref_: napi_ref,
    result: *mut u32,
) -> napi_status
Available on crate feature napi only.
Expand description

Decrements the reference count for the reference passed in and returns the count.

§Arguments

  • env - Current running virtual machine context.

  • ref - The napi_ref whose reference count will be decremented.

  • result - The new reference count.

§Returns

  • Returns the function execution status. [napi_ok] If the function executed successfully.

[napi_invalid_arg] If env or ref is nullptr.

Available since API-level: 10