ReuseGrid* ReuseGrid::create(int times) { ReuseGrid *action = new (std::nothrow) ReuseGrid(); if (action && action->initWithTimes(times)) { action->autorelease(); return action; } delete action; return nullptr; }
ReuseGrid* ReuseGrid::create(int times) { ReuseGrid *action = new (std::nothrow) ReuseGrid(); if (action) { if (action->initWithTimes(times)) { action->autorelease(); } else { CC_SAFE_DELETE(action); } } return action; }