Sfoglia il codice sorgente

Implemented the new deallocate() methods in webgl_test_memory.

Mr.doob 13 anni fa
parent
commit
fa245d81c6
1 ha cambiato i file con 8 aggiunte e 0 eliminazioni
  1. 8 0
      examples/webgl_test_memory.html

+ 8 - 0
examples/webgl_test_memory.html

@@ -85,6 +85,14 @@
 
 
 				scene.remove( mesh );
 				scene.remove( mesh );
 
 
+				//
+
+				texture.deallocate();
+
+				mesh.deallocate();
+				mesh.geometry.deallocate();
+				mesh.material.deallocate();
+
 				renderer.deallocateObject( mesh );
 				renderer.deallocateObject( mesh );
 				renderer.deallocateTexture( texture );
 				renderer.deallocateTexture( texture );