Skip to content

Commit 1af1642

Browse files
authored
doc: warn about SuppressDestruct()
Not sure how this ever made its way into the API, but people should *never* use this.
1 parent 12c548b commit 1af1642

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

napi.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,6 +1167,8 @@ namespace Napi {
11671167
// Call this on a reference that is declared as static data, to prevent its destructor
11681168
// from running at program shutdown time, which would attempt to reset the reference when
11691169
// the environment is no longer valid.
1170+
// Avoid using this if at all possible. If you do need to use static data,
1171+
// MAKE SURE to warn your users that your addon is NOT threadsafe.
11701172
void SuppressDestruct();
11711173

11721174
protected:

0 commit comments

Comments
 (0)