NS_CC_BEGIN PageTurn3D* PageTurn3D::create(float duration, const Size& gridSize) { PageTurn3D *action = new (std::nothrow) PageTurn3D(); if (action && action->initWithDuration(duration, gridSize)) { action->autorelease(); return action; } delete action; return nullptr; }
NS_CC_BEGIN PageTurn3D* PageTurn3D::create(float duration, const Size& gridSize) { PageTurn3D *action = new PageTurn3D(); if (action) { if (action->initWithDuration(duration, gridSize)) { action->autorelease(); } else { CC_SAFE_RELEASE_NULL(action); } } return action; }