Skip to content

Commit b7278c5

Browse files
committed
Removed nullifying on dispose.
Official comment from VM guy is that it isn't needed.
1 parent 6f001e6 commit b7278c5

File tree

5 files changed

+0
-29
lines changed

5 files changed

+0
-29
lines changed

examples/webgl_test_memory.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
geometry.dispose();
9191
material.dispose();
9292
texture.dispose();
93-
mesh.dispose();
9493

9594
}
9695

src/core/Geometry.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -740,12 +740,6 @@ THREE.Geometry.prototype = {
740740

741741
this.dispatchEvent( { type: 'dispose' } );
742742

743-
for ( var property in this ) {
744-
745-
this[ property ] = null;
746-
747-
}
748-
749743
}
750744

751745
};

src/core/Object3D.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -349,16 +349,6 @@ THREE.Object3D.prototype = {
349349

350350
return object;
351351

352-
},
353-
354-
dispose: function () {
355-
356-
for ( var property in this ) {
357-
358-
this[ property ] = null;
359-
360-
}
361-
362352
}
363353

364354
};

src/materials/Material.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,6 @@ THREE.Material.prototype.dispose = function () {
120120

121121
this.dispatchEvent( { type: 'dispose' } );
122122

123-
for ( var property in this ) {
124-
125-
this[ property ] = null;
126-
127-
}
128-
129123
};
130124

131125
THREE.MaterialIdCount = 0;

src/textures/Texture.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,6 @@ THREE.Texture.prototype = {
8181

8282
this.dispatchEvent( { type: 'dispose' } );
8383

84-
for ( var property in this ) {
85-
86-
this[ property ] = null;
87-
88-
}
89-
9084
}
9185

9286
};

0 commit comments

Comments
 (0)