Lines Matching refs:cleanup

5 Node-API provides APIs for adding and removing cleanup hooks, which are called to release resources…
9 Before using Node-API to add or remove cleanup hooks, understand the following concepts:
12 …ically reclaimed immediately. In the context of the Node-API module, the cleanup hooks are a suppl…
14 … in ArkTS and cleanup hook functions. Read on to learn the Node-API interfaces that you can use to…
18 The following table lists the APIs for using different types of cleanup hooks.
21 | napi_add_env_cleanup_hook | Adds an environment cleanup hook function, which will be called when …
22 | napi_remove_env_cleanup_hook | Removes an environment cleanup hook function.|
23 | napi_add_async_cleanup_hook | Adds an async cleanup hook function, which will be executed asynchr…
24 | napi_remove_async_cleanup_hook | Removes an async cleanup hook function.|
28 …md). The following demonstrates only the C++ and ArkTS code involved in the APIs for cleanup hooks.
32 Use **napi_add_env_cleanup_hook** to add an environment cleanup hook function, which will be execut…
36 Use **napi_remove_env_cleanup_hook** to remove the previously added environment cleanup hook functi…
57 // Perform cleanup operations when the environment is closed, for example, clear global variables o…
60 // Perform the cleanup operation.
63 // Create an external buffer and add the environment cleanup hook function.
72 // Create an external buffer object and specify the cleanup callback function.
78 // Add a cleanup hook function for releasing resources when the environment exits.
84 …// Add the environment cleanup hook function. The hook function is not removed here to make it cal…
90 // Remove the environment cleanup hook function immediately.
141 Use **napi_add_async_cleanup_hook** to add an async cleanup hook function, which will be executed a…
145 Use **napi_remove_async_cleanup_hook** to remove an async cleanup hook function that is no longer r…
177 // Perform cleanup operations, for example, release the dynamically allocated memory.
186 // Create and trigger an async cleanup operation in an event loop.
197 // Send an async signal to trigger the AsyncWork function to perform cleanup.
213 // Add an async cleanup hook function.