remove delete this from init methods

This commit is contained in:
ivzave 2012-09-05 22:30:44 +04:00
parent ecc4e769dc
commit cf67922ee0
3 changed files with 1 additions and 5 deletions

View File

@ -101,7 +101,6 @@ bool CCAtlasNode::initWithTileFile(const char *tile, unsigned int tileWidth, uns
if (! m_pTextureAtlas) if (! m_pTextureAtlas)
{ {
CCLOG("cocos2d: Could not initialize CCAtlasNode. Invalid Texture."); CCLOG("cocos2d: Could not initialize CCAtlasNode. Invalid Texture.");
delete this;
return false; return false;
} }

View File

@ -146,7 +146,6 @@ bool CCGridBase::initWithSize(const ccGridSize& gridSize)
if (! pTexture) if (! pTexture)
{ {
CCLOG("cocos2d: CCGrid: error creating texture"); CCLOG("cocos2d: CCGrid: error creating texture");
delete this;
return false; return false;
} }

View File

@ -148,9 +148,7 @@ bool CCTextureAtlas::initWithFile(const char * file, unsigned int capacity)
else else
{ {
CCLOG("cocos2d: Could not open file: %s", file); CCLOG("cocos2d: Could not open file: %s", file);
delete this; return false;
return NULL;
} }
} }