Skip to content

Documentation: Mention that Napi::Reference must not be stored in a global static instance #162

Closed
@gabrielschulhof

Description

@gabrielschulhof

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.

See the source.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions