CAPageControl* CAPageControl::createWithCenter(const CCRect& rect) { CAPageControl* page = new CAPageControl(); if (page && page->initWithCenter(rect)) { page->autorelease(); return page; } CC_SAFE_DELETE(page); return NULL; }
CAPageControl* CAPageControl::create() { CAPageControl* page = new CAPageControl(); if (page && page->init()) { page->autorelease(); return page; } CC_SAFE_DELETE(page); return NULL; }