mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
There already is an existing requirement to have matching calls of `napi_async_init()` and `napi_async_destroy()`, so expecting users of this API to manually hold onto the resource for the duration of the `napi_async_context`'s lifetime is unnecessary. Weak callbacks are generally useful for when a corresponding C++ object should be cleaned up when a JS object is gargbage-collected, but that is not the case here. PR-URL: https://github.com/nodejs/node/pull/59828 Reviewed-By: Chengzhong Wu <legendecas@gmail.com>