You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Documentation: Mention that Napi::Reference must not be stored in a global static instance #162
This must be avoided because Reference calls napi_delete_reference(), which in turn calls Reset() on the persistent stored inside, which ends up crashing because it runs from the library destructor, which in turn runs after the Isolate has already been disposed of.
The Reference SuppressDestruct method permits the user to set a private data member that avoids the napi_delete_reference call in ~Reference. Would calling SuppressDestruct permit the Reference to be a global static instance?
Activity
jschlight commentedon Mar 29, 2018
The Reference
SuppressDestructmethod permits the user to set a private data member that avoids thenapi_delete_referencecall in~Reference. Would callingSuppressDestructpermit the Reference to be a global static instance?jschlight commentedon Mar 29, 2018
This issue can be closed when PR #243 lands.
NickNaso commentedon Sep 3, 2018
@gabrielschulhof Could be possible close this issue? The
Napi::Referencedocumentation was landed with PR #243NickNaso commentedon Sep 17, 2018
I'm closing this issue it was solved with PR #243