maxogden/voxel-engine — pull request #48 by hughsk (2013-02-20 12:32:19+00:00)
Title: Clean up voxel chunks more thoroughly

I was checking out the infinite terrain, but the game would freeze after hitting 600-700MB memory usage. Turns out you have to [deallocate geometries/textures/shaders/etc. manually](http://stackoverflow.com/questions/12945092/memory-leak-with-three-js-and-many-shapes).

After that, deleting the properties of the chunk mesh seemed to do the trick - the game still hits ~600MB but doesn't freeze anymore :)