CScale9Sprite* CScale9Sprite::createWithSpriteFrameName(const char* spriteFrameName, Rect capInsets) { CScale9Sprite* pReturn = new CScale9Sprite(); if ( pReturn && pReturn->initWithSpriteFrameName(spriteFrameName, capInsets) ) { pReturn->autorelease(); return pReturn; } CC_SAFE_DELETE(pReturn); return NULL; }
CScale9Sprite* CScale9Sprite::createWithSpriteFrameName(const char* spriteFrameName) { CCAssert(spriteFrameName != NULL, "spriteFrameName must be non-NULL"); CScale9Sprite* pReturn = new CScale9Sprite(); if ( pReturn && pReturn->initWithSpriteFrameName(spriteFrameName) ) { pReturn->autorelease(); return pReturn; } CC_SAFE_DELETE(pReturn); log("Could not allocate CScale9Sprite()"); return NULL; }