CCScale9Sprite* CCScale9Sprite::createWithSpriteFrame(CCSpriteFrame* spriteFrame) { CCScale9Sprite* pReturn = new CCScale9Sprite(); if ( pReturn && pReturn->initWithSpriteFrame(spriteFrame) ) { pReturn->autorelease(); return pReturn; } CC_SAFE_DELETE(pReturn); return NULL; }
CCScale9Sprite* CCScale9Sprite::createWithSpriteFrame(CCSpriteFrame* spriteFrame, CCRect capInsets) { CCScale9Sprite* pReturn = new CCScale9Sprite(); if ( pReturn && pReturn->initWithSpriteFrame(spriteFrame, capInsets) ) { CC_SAFE_AUTORELEASE(pReturn); return pReturn; } CC_SAFE_DELETE(pReturn); return NULL; }