i have started using cocos2d-x in iphone. i have create a class which inherit from cclayer , now when i try to register it with touch dispatcher it got crash.
in .h file.
class BasePage : public cocos2d::CCLayer
and .m file
CCDirector::sharedDirector()->getTouchDispatcher()->addTargetedDelegate(this, INT_MIN + 1, true);
and i got crash in ccobject.m file
CCAssert(m_uReference > 0, “reference count should greater than 0”);[here is crash]
Can anyone please give me some solution ?
Thank you in advance