DecorativeDisplay *DecorativeDisplay::create() { DecorativeDisplay *pDisplay = new DecorativeDisplay(); if (pDisplay && pDisplay->init()){ pDisplay->autorelease(); return pDisplay; } CC_SAFE_DELETE(pDisplay); return NULL; }
DecorativeDisplay *DecorativeDisplay::create() { DecorativeDisplay *pDisplay = new (std::nothrow) DecorativeDisplay(); if (pDisplay && pDisplay->init()) { pDisplay->autorelease(); return pDisplay; } CC_SAFE_DELETE(pDisplay); return nullptr; }