Пример #1
0
BlurSprite* BlurSprite::create(const char* filename)
{
    BlurSprite * ret = new BlurSprite();
    if (ret && ret->initWithFile(filename))
    {
        ret->autorelease();
        return ret;
    }
    
    CC_SAFE_RELEASE(ret);
    return NULL;
}
Пример #2
0
BlurSprite* BlurSprite::create(const char *pszFileName)
{
	BlurSprite* pRet = new (std::nothrow) BlurSprite();
	if (pRet && pRet->initWithFile(pszFileName))
	{
		pRet->autorelease();
	}
	else
	{
		CC_SAFE_DELETE(pRet);
	}

	return pRet;
}