Skip to content

Feature suggestion - event from the JS Garbage Collector #238

@lskyum

Description

@lskyum

Suppose one would like to nicely wrap C++ objects in JavaScript objects, so they could be exposed to JavaScript developers. I suppose many uses for wasm will be exactly that - at least in the beginning, until Java/C# is available.

With Emscripten it is currently nessesary to manually delete such objects, but it would be nice if one could just catch an event when the JS object is garbagecollected.

I suppose this is really a feature request for a "rooting API", to allow for weak references, that can provide an event, when an object is garbage collected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions