BoneNode* BoneNode::create() { BoneNode* ret = new (std::nothrow) BoneNode(); if (ret && ret->init()) { ret->autorelease(); return ret; } CC_SAFE_DELETE(ret); return nullptr; }
BoneNode* BoneNode::create(int length) { BoneNode* ret = new (std::nothrow) BoneNode(); if (ret && ret->init()) { ret->setDebugDrawLength(length); ret->autorelease(); } else { CC_SAFE_DELETE(ret); } return ret; }