napi_close_handle_scope

Function napi_close_handle_scope 

Source
pub unsafe extern "C" fn napi_close_handle_scope(
    env: napi_env,
    scope: napi_handle_scope,
) -> napi_status
Available on crate feature napi only.
Expand description

Closes the scope passed in. After the scope is closed, all references declared in it are closed.

§Arguments

  • env - Current running virtual machine context.

  • scope - The scope to close.

§Returns

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

[napi_invalid_arg] If env or scope is nullptr.

[napi_handle_scope_mismatch] If there is no scope still existed.

Available since API-level: 10