PhysicsContact* PhysicsContact::create(PhysicsShape* a, PhysicsShape* b) { PhysicsContact * contact = new PhysicsContact(); if(contact && contact->init(a, b)) { return contact; } CC_SAFE_DELETE(contact); return nullptr; }
PhysicsContact* PhysicsContact::construct(PhysicsShape* a, PhysicsShape* b) { PhysicsContact * contact = new (std::nothrow) PhysicsContact(); if(contact && contact->init(a, b)) { return contact; } CC_SAFE_DELETE(contact); return nullptr; }