window.global_array = new Array();
window.example = function()
{
var x = new Object();
x['test_property'] = 3;
global_array.push(x);
}
Javascript gurus, please answer three questions:
- will javascript delete x at the end of scope when example() returns, or preserve it inside global_array.
- can I safely assume javascript works like 'everything is a reference' in python?
- are all VMs created equal or will GC rules vary by implementation.