Best way to deallocate an array of array in javascript
Posted
by andre.dias
on Stack Overflow
See other posts from Stack Overflow
or by andre.dias
Published on 2010-06-08T17:13:18Z
Indexed on
2010/06/08
17:52 UTC
Read the original article
Hit count: 237
JavaScript
What is the best way to deallocate an array of array in javascript to make sure no memory leaks will happen?
var foo = new Array();
foo[0] = new Array();
foo[0][0] = 'bar0';
foo[0][1] = 'bar1';
foo[1] = new Array();
...
- delete(foo)?
- iterate through foo, delete(foo[index]) and delete(foo)?
- 1 and 2 give me the same result?
- none?
© Stack Overflow or respective owner