Closed zicklag closed 5 years ago
Looks like this actually isn't possible to do for JS, unfortunately. :slightly_frowning_face: ( see https://github.com/emscripten-core/emscripten/issues/8206#issuecomment-468031992 ). Should maybe update the autoGC
flag to be hlAutoGC
or something else specific to HL to avoid confusion.
Currently the AutoGC option doesn't do anything for the JavaScript target. The WebIDL binder that comes with Emscripten and is used for Ammo.js does do some kind of wrapping of the generated bindings that allows the pointers to be garbage collected by JavaScript. I don't understand exactly how this works, but I'll have to try to take the same concept and implement it here.
If anybody else understands it I could use some pointers. :slightly_smiling_face: