Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: clarify that ObjectWrap requires manual cleanup on shutdown #40074

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/api/addons.md
Expand Up @@ -965,6 +965,10 @@ provided by the underlying V8 JavaScript engine. They are subject to change
or removal at any time. They are not documented by Node.js or V8, and they
should never be used outside of testing.

During shutdown of the process or worker threads destructors are not called
by the JS engine. Therefore it's in the responsibility of the user to track
Flarna marked this conversation as resolved.
Show resolved Hide resolved
these objects and ensure proper destruction to avoid resource leaks.

Flarna marked this conversation as resolved.
Show resolved Hide resolved
### Factory of wrapped objects

Alternatively, it is possible to use a factory pattern to avoid explicitly
Expand Down