emscripten-core / emscripten-core/emscripten
Unable to dispose wasm instance.
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
Hello,
In my app design i'm compiling WASM once and have to create several instances of WASM on different events.
But i have no idea how to dispose those instances, when i don't need them.
I googled the issue and found that it uses normal garbage collector, so if instance not referenced - it is automatically destroyed.
But this seems doesn't work. The point is my WASM project uses pthreads. And when i instantiate it - i see 8 additional threads (em-pthread) in workers list.
But when i set this.wasmInstance to null - Threads aren't disposed. So i guess instance is not garbage collected.
So how can i properly destroy WASM instances then ?
Contributor guide
Assessment
This issue has not been assessed yet.