CButton* CButton::create(const char* pNormal, const char* pSelected, const char* pDisabled) { CButton* pRet = new CButton(); if( pRet && pRet->initWithFile(pNormal, pSelected, pDisabled) ) { pRet->autorelease(); return pRet; } CC_SAFE_DELETE(pRet); return NULL; }
CButton* CButton::create() { CButton* pRet = new CButton(); if( pRet && pRet->init() ) { pRet->autorelease(); return pRet; } CC_SAFE_DELETE(pRet); return NULL; }