Hi,
I'm trying to understand how to embind the various types I want to expose to JS, and if I understand it correctly, the embind documentation seems incomplete.
The docs state that JS cannot call destructors automatically, and then suggests this code:
var x = new Module.MyClass;
x.method();
x.delete();
- Does this mean that all objects defined with class_ have a built-in JS method called delete, that calls their destructor?
- If so, is this the same for already available types, such as smart pointers and vectors? If not, how do I dispose of smart pointers and vectors?
- How are raw pointers freed? The code examples
- How do value types play with smart pointers and vectors? Can they be contained?
- Can a value_object be an element in a value_array? Can a value_array be a field in a value_object?
- Can either value types be used as members of a class_?