Skip to content

native callback with object gc #2

Closed
@seanshpark

Description

@seanshpark

I'm adding this issue to discuss in open so may help others to understand and join (to the issues)

Codes can be efficient if some native function is called when JS Object is garbage collected so that some block of memory linked to that Object can be freed. Something like MakeWeak in V8.

API something like this;

typedef bool (*jerry_object_free_callback_t) (const jerry_api_object_t* obj);
bool jerry_api_set_objectfreecb(jerryt_api_object_t* obj, jerry_object_free_callback_t handler_p);

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions