I have the following code:
var o = (function() {
var o1 = {name: "o1"};
var o2 = {name: "o2"};
var o3 = {name: "o3"};
o1.child = o2;
o2.child = o3;
o3.parent = o2;
setTimeout(function() {
o1.child = null;
}, 1000);
return o1;
})();
Are objects o2
and o3
eligible for garbage collection after timeout callback exits?