Преглед на файлове

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

Mr.doob преди 12 години
родител
ревизия
24668969bc
променени са 4 файла, в които са добавени 4 реда и са изтрити 4 реда
  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;
 
 		}