Closed dukc closed 3 years ago
Oh sorry, there's the JavaScript export Node_appendChild
that is called, that does copy the handle so double free should not happen. I think I was looking at appendChild
JavaScript export without realizing it isn't the one that's called.
It is something else that nullified my object pointer.
Node.appendChild currently needs to be used this way:
That's because appendChild copies the
JsHandle
contained in*logo
into it's return value. If I don't manually nullify it, its destructor runs, and prematurely deletes the JavaScript object*logo
refers to.Clearly the API of
Node.appendChild
needs rethinking.