This commit is contained in:
Ming 2010-09-07 08:30:18 +00:00
parent 8eb885382e
commit ce0d6f33ce
1 changed files with 2 additions and 2 deletions

View File

@ -28,9 +28,9 @@ bool THelloWorldApp::initCocos2d()
CGSize size = CCDirector::getSharedDirector()->getWinSize(); CGSize size = CCDirector::getSharedDirector()->getWinSize();
// create sprite instance // create sprite instance
CCSprite * pSprite = (new CCSprite())->initWithTexture(pTexture); CCSprite * pSprite = new CCSprite();
pSprite->initWithTexture(pTexture);
pSprite->setPosition(CGPoint(size.width / 2, size.height / 2)); pSprite->setPosition(CGPoint(size.width / 2, size.height / 2));
pSprite->autorelease()->retain();
// create layer instance // create layer instance
CCLayer * pLayer = new CCLayer(); CCLayer * pLayer = new CCLayer();