Hi everyone,

I would like to ask what the delete() method exactly does? Is it similar to 
calling the C++ destructor?

Lets say that I have this C++ code:

class MyObj;

class MyContainer
{

...

bool addObj(const MyObj & obj);
// objects are internally held as a container of shared pointers;
std::unordered_set<std::shared_ptr<MyObj >> objects;

}



and this JS code:

var obj = new MyObj;


var container = new MyContainer;


container.addObj(obj );


obj.delete();

//Can I correctly work here with the shared pointer to *obj *in the 
*container *object or it is already gone?

container.delete();




Thanks!

Regards.

Jan


-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to