As title said, somewhere i called the CCSprite::create() in a singleton object during app start up
and later i called CCLayer::create() from a CCScene::init().
The two calls to create() return the same address making the program crash when i try to add the layer to the main scene ( because it already have a parent).
I want to know what i did wrong making the later call to CCLayer::create() return the address which should be in used at that moment.
the mpSprite is placed inside a “ball” instance inside a “stage” instance which is inside a “Core” singleton.
so i think the mpSprite is not released by accident.
I have attached a screen shot about the code.
omg.png (73.7 KB)