PrismarineJS/prismarine-viewer


The issue has been closed
Storage leaks #196
antithug posted onGitHub
I'm using prismarine-web-client, and threejs objects are not getting released. I believe you have to 'dispose' of all the threejs objects (textures, materials, etc.) to get them to release the webgl data. With a big world, you can only play for a short time before the browser tab quits.
When a chunk is unloaded in the web client, it seems to be handled properly - the prismarine chunk is deleted. And that should release the underlying threejs objects, but you need to explicitly dispose of the textures, materials, etc. If you look at the heap snapshots, the storage that leaks is the system/JSArrayBufferData, which I think is the webgl system data. Everything else looks fine.