Is object literal free memory when same object name recreate? what is effect on memory when I recreate same object name from object literal. e.g.
var objLit = {};
for(var i=0; i<5; i++){
objLit['room'] = {};
objLit['room'].name = "A",
objLit['room'].class = 10
}
console.log(objLit['room']);
output is currect but what about 4 previews object literal which made by for
loop. my question:
is all 4 object auto delete?
is all 4 object reference auto delete?