Reputation: 61
I use the built-in shape extrusion function to extrude a shape along a spline. I create a new mesh everytime I move the nodes of the spline. But this way my RAM is full very fast. Everytime I create a new mesh I delete the old one with
scene.__removeObject(mesh);
but it doesn't release the used memory. I tested Firefox Nightly and Chrome and both crash if the memory is full.
I searched for a general WebGL feature and for Three.js related solution but didn't find anything.
Maybe someone with more WebGL / Three.js knowledge can give me a hint. Thank you
Upvotes: 6
Views: 1255
Reputation: 2077
Ensure you're not referencing the javascript mesh object anywhere else, so that the garbage collector can delete it.
Upvotes: 1