mceSystems / node-jsc

A node.js port to the JavaScriptCore engine and iOS
Other
222 stars 16 forks source link

Add destroy functions #17

Closed Constellation closed 6 years ago

Constellation commented 6 years ago

If we want to call the destructor of the GC-managed objects, we need to (1) inherit JSDestructibleObject and (2) define own destroy function.

This patch implements destroy functions so that destructors are called correctly. Also, we change some of JSDestructibleObject to JSNonFinalObject if they do not require calling destructors.