Best way to deallocate an array of array in javascript
- by andre.dias
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?