I have a global object 'm1' on my html5 web page. Here is how it's defined:
m1:
{
def: null
},
I'm working with that object throught the game by adding more variables to it (actually it's graphic sprites):
m1.actor1 = new CreateSprite(...);
At some point of time I don't need m1 object anymore and ALL of the resources taken by its inner variables. Would that action tell garbage collector to totally erase it? :
m1 = { };
Does it mean that after this object recreation I get m1.actor1 erased as well?