addChild()の前にretain()を呼び出す必要がある理由を誰か教えてください自分たちで?
bool GameOverScene::init()
{
if( CCScene::init() )
{
this->_layer = GameOverLayer::create();
this->_layer->retain();
this->addChild(_layer);
return true;
}
else
{
return false;
}
}
GameOverScene::~GameOverScene()
{
if (_layer)
{
_layer->release();
_layer = NULL;
}
}