Skip to content

Alternative to creating references to non-objects #149

@mika-fischer

Description

@mika-fischer

nodejs/node#15289 removed the possibility to create references to values that are not objects.

My use-case is the following. I want to store arguments given to my function persistently. Then some time later I want to call a callback function with those parameters. In the past I just used a vector<Reference<Value>>. Now I don't quite understand how I'm supposed to do it...

As an example, see this test: https://github.com/mika-fischer/napi-thread-safe-callback/blob/e03dda83fb1d2a63fb8332406e2436fc18a63fba/test/tests.cpp#L36-L51

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions