GridBase* GridBase::create(const Size& gridSize, Texture2D *texture, bool flipped) { GridBase *pGridBase = new (std::nothrow) GridBase(); if (pGridBase) { if (pGridBase->initWithSize(gridSize, texture, flipped)) { pGridBase->autorelease(); } else { CC_SAFE_RELEASE_NULL(pGridBase); } } return pGridBase; }
NS_CC_BEGIN // implementation of GridBase GridBase* GridBase::create(const Size& gridSize) { GridBase *pGridBase = new (std::nothrow) GridBase(); if (pGridBase) { if (pGridBase->initWithSize(gridSize)) { pGridBase->autorelease(); } else { CC_SAFE_RELEASE_NULL(pGridBase); } } return pGridBase; }