HelloWorld* HelloWorld::create(PhysicsWorld* world,int level) { HelloWorld* pRet = new HelloWorld(); if (pRet && pRet->init(world,level)){ pRet->autorelease(); return pRet; } delete pRet; pRet = NULL; return NULL; }
HelloWorld* HelloWorld::create() { HelloWorld* pRet = new HelloWorld(); if (pRet && pRet->init()) { pRet->autorelease(); return pRet; } return NULL; }
HelloWorld* HelloWorld::create() \ { \ HelloWorld *pRet = new HelloWorld(); \ if (pRet && pRet->init()) \ { \ pRet->autorelease(); \ return pRet; \ } \ else \ { \ delete pRet; \ pRet = NULL; \ return NULL; \ } \ }