浏览代码

Merge pull request #1886 from wyklion/master

reset release memory
Loïc Baumann 8 年之前
父节点
当前提交
3821cf14a3
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/Tools/babylon.smartArray.ts

+ 4 - 1
src/Tools/babylon.smartArray.ts

@@ -44,6 +44,9 @@
         }
         }
 
 
         public reset(): void {
         public reset(): void {
+            for (var index = 0; index < this.data.length; index++) {
+                this.data[index] = null;
+            }
             this.length = 0;
             this.length = 0;
             this._duplicateId++;
             this._duplicateId++;
         }
         }
@@ -88,4 +91,4 @@
         // Statics
         // Statics
         private static _GlobalId = 0;
         private static _GlobalId = 0;
     }
     }
-} 
+}