DeccelAmplitude* DeccelAmplitude::create(Action *action, float duration) { DeccelAmplitude *ret = new (std::nothrow) DeccelAmplitude(); if (ret && ret->initWithAction(action, duration)) { ret->autorelease(); return ret; } delete ret; return nullptr; }
DeccelAmplitude* DeccelAmplitude::create(Action *action, float duration) { DeccelAmplitude *ret = new (std::nothrow) DeccelAmplitude(); if (ret) { if (ret->initWithAction(action, duration)) { ret->autorelease(); } else { CC_SAFE_DELETE(ret); } } return ret; }