Thief* Thief::create(const Vector<Node*>& points) { Thief* pRet = new Thief(); if(pRet && pRet->init()) { pRet->setPointsVector(points); pRet->runFllowPoint(); pRet->autorelease(); } else { delete pRet; pRet = nullptr; } return pRet; }
Thief* Thief::createThief(Vector<Node*> points) { Thief *pRet = new Thief(); if (pRet && pRet->init()) { pRet->setPointsVector(points); pRet->runFllowPoint(); pRet->autorelease(); return pRet; } else { delete pRet; pRet = NULL; return NULL; } }