For example:
var test = [1,2,3,4,5];
test.length = 0;
Is this a good way to release memory of variable test
?
For example:
var test = [1,2,3,4,5];
test.length = 0;
Is this a good way to release memory of variable test
?
No don't worry about that, that just makes your code longer. Keep your variable in the tightest of scope, and if not needed anymore, it should get handled by the garbage collection system.