napi_reference_ref
NAPI_EXTERN napi_status napi_reference_ref(napi_env env,
napi_ref ref,
uint32_t* result);
-
[in] env
:调用 API 的环境。¥
[in] env
: The environment that the API is invoked under. -
[in] ref
:napi_ref
,其引用计数将增加。¥
[in] ref
:napi_ref
for which the reference count will be incremented. -
[out] result
:新的引用计数。¥
[out] result
: The new reference count.
如果 API 成功,则返回 napi_ok
。
¥Returns napi_ok
if the API succeeded.
此 API 增加传入引用的引用计数并返回生成的引用计数。
¥This API increments the reference count for the reference passed in and returns the resulting reference count.