napi_remove_env_cleanup_hook
NAPI_EXTERN napi_status napi_remove_env_cleanup_hook(node_api_basic_env env,
void (*fun)(void* arg),
void* arg); 取消注册 fun,使其不再作为在当前 Node.js 环境退出时使用 arg 参数运行的函数。参数和函数值都需要完全匹配。
🌐 Unregisters fun as a function to be run with the arg parameter once the
current Node.js environment exits. Both the argument and the function value
need to be exact matches.
该函数必须最初使用 napi_add_env_cleanup_hook 注册,否则进程将中止。
🌐 The function must have originally been registered
with napi_add_env_cleanup_hook, otherwise the process will abort.