Regarding JavaScript, when clearing an array, I've found two methods:
myArray.length = 0;
vs
myArray = new Array()
I would guess myArray.length = 0;
keeps the reference while myArray = newArray()
creates a new reference making previous references void.
What's the difference (if any) between the two methods?