There´s any need to set to null a reference in this case?
private function initGame():void{
game= new Game()
}
private function endGame():void{
removeChild(game)
//here, should I set game to null?
}
then, to start a new game:
initGame()
In this case, do I need to set game to null at endGame? Or by adding a new game instance to game variable, the previous instance has no more reference and so is eligible for garbage collection?
Thanks