I took this code from the “simplegame” example and i think this part is obsolete right?
What does “if( CCScene::init() )” means here? Do i really need to check it?
bool GameOverScene::init()
{
if( CCScene::init() )
{
this->_layer = GameOverLayer::node();
this->_layer->retain();
this->addChild(_layer);
return true;
}
else
{
return false;
}
}
When you “dealloc” the scene the Garbage collector will handle everything? (the null part)
GameOverScene::~GameOverScene()
{
if (_layer)
{
_layer->release();
_layer = NULL;
}
}