Browse Source

Nulling instead of deleting in dispose().
Still waiting for an "official" recommendation from a VM guy though.

Mr.doob 12 years ago
parent
commit
24668969bc
4 changed files with 4 additions and 4 deletions
  1. 1 1
      src/core/Geometry.js
  2. 1 1
      src/core/Object3D.js
  3. 1 1
      src/materials/Material.js
  4. 1 1
      src/textures/Texture.js

+ 1 - 1
src/core/Geometry.js

@@ -742,7 +742,7 @@ THREE.Geometry.prototype = {
 
 		for ( var property in this ) {
 
-			delete this[ property ];
+			this[ property ] = null;
 
 		}
 

+ 1 - 1
src/core/Object3D.js

@@ -355,7 +355,7 @@ THREE.Object3D.prototype = {
 
 		for ( var property in this ) {
 
-			delete this[ property ];
+			this[ property ] = null;
 
 		}
 

+ 1 - 1
src/materials/Material.js

@@ -122,7 +122,7 @@ THREE.Material.prototype.dispose = function () {
 
 	for ( var property in this ) {
 
-		delete this[ property ];
+		this[ property ] = null;
 
 	}
 

+ 1 - 1
src/textures/Texture.js

@@ -83,7 +83,7 @@ THREE.Texture.prototype = {
 
 		for ( var property in this ) {
 
-			delete this[ property ];
+			this[ property ] = null;
 
 		}