Freeing JavaScript object
- by pion
I am looking at the example from http://www.javascriptkit.com/javatutors/oopjs.shtml
var person = new Object()
person.name = "Tim Scarfe"
person.height = "6Ft"
But there is no mention how to "free" it in order to avoid memory leak.
Will the following code free it?
person = null;
How do you free a JavaScript Object using "new Object()?
How do you free a JavaScript Array allocated using "new Array(10)"?
How do you free a JavaScript JSON allocated using "var json = {"width": 480, "height": 640}"?
Thanks in advance for your help.