Browse Source

Removed nullifying on dispose.
Official comment from VM guy is that it isn't needed.

Mr.doob 12 years ago
parent
commit
b7278c5d12

+ 0 - 1
examples/webgl_test_memory.html

@@ -90,7 +90,6 @@
 				geometry.dispose();
 				material.dispose();
 				texture.dispose();
-				mesh.dispose();
 
 			}
 

+ 0 - 6
src/core/Geometry.js

@@ -740,12 +740,6 @@ THREE.Geometry.prototype = {
 
 		this.dispatchEvent( { type: 'dispose' } );
 
-		for ( var property in this ) {
-
-			this[ property ] = null;
-
-		}
-
 	}
 
 };

+ 0 - 10
src/core/Object3D.js

@@ -349,16 +349,6 @@ THREE.Object3D.prototype = {
 
 		return object;
 
-	},
-
-	dispose: function () {
-
-		for ( var property in this ) {
-
-			this[ property ] = null;
-
-		}
-
 	}
 
 };

+ 0 - 6
src/materials/Material.js

@@ -120,12 +120,6 @@ THREE.Material.prototype.dispose = function () {
 
 	this.dispatchEvent( { type: 'dispose' } );
 
-	for ( var property in this ) {
-
-		this[ property ] = null;
-
-	}
-
 };
 
 THREE.MaterialIdCount = 0;

+ 0 - 6
src/textures/Texture.js

@@ -81,12 +81,6 @@ THREE.Texture.prototype = {
 
 		this.dispatchEvent( { type: 'dispose' } );
 
-		for ( var property in this ) {
-
-			this[ property ] = null;
-
-		}
-
 	}
 
 };