|
|
|
|
|
by panstromek
409 days ago
|
|
Hm.. I would honestly try to avoid relying on finalization mechanism of a garbage collector like this. It sounds brittle from the start. Even without the bug, I can imagine you can get into a situation where some unused JS object holds a reference to a giant thing in wasm memory, but engine doesn't run the GC, because it technically doesn't know that, it only sees the little pointer object which seems small. I think WASM had historically had some problem with freeing memory, so I'd probably rather rely on some pooling or arena with explicit memory size limit (for the whole allocated wasm memory). |
|