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); 

一旦当前 Node.js 环境退出,将 fun 注销为要使用 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.