Browse Source

reset release memory

_activeSkeletons is very big.
KK 8 years ago
parent
commit
2f062cb59e
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/Tools/babylon.smartArray.ts

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

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