Skip to content

Commit

Permalink
doc: warn about SuppressDestruct()
Browse files Browse the repository at this point in the history
Not sure how this ever made its way into the API, but people should *never* use this.
  • Loading branch information
addaleax authored Mar 9, 2021
1 parent 12c548b commit 1af1642
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions napi.h
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,8 @@ namespace Napi {
// Call this on a reference that is declared as static data, to prevent its destructor
// from running at program shutdown time, which would attempt to reset the reference when
// the environment is no longer valid.
// Avoid using this if at all possible. If you do need to use static data,
// MAKE SURE to warn your users that your addon is NOT threadsafe.
void SuppressDestruct();

protected:
Expand Down

0 comments on commit 1af1642

Please sign in to comment.