Is this obsolete?

Is this obsolete?
0.0 0


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();
        return true;
        return false;

When you “dealloc” the scene the Garbage collector will handle everything? (the null part)

    if (_layer)
        _layer = NULL;


CCScene::init() is calling super class’s function, it likes [super init] in object-c.
In c++, there is not garbage collector.


So i always need to call super init when creating a new scene?
Also i have to delete all created objects before leaving a scene? (release + null)


Yes, you should call super init.
If you retain object in your class, you should release them if you don’t need them.
Release an object is not equal to delete an object.
I have answered the question in other thread.