fix crash in TouchesTest.cpp on vs

This commit is contained in:
Dhilan007 2014-01-06 17:31:49 +08:00
parent 3a95c9db3e
commit 5786c8aa41
1 changed files with 0 additions and 3 deletions

View File

@ -43,7 +43,6 @@ PongLayer::PongLayer()
_ball->setPosition( VisibleRect::center() );
_ball->setVelocity( _ballStartingVelocity );
addChild( _ball );
_ball->retain();
auto paddleTexture = Director::getInstance()->getTextureCache()->addImage(s_Paddle);
@ -77,7 +76,6 @@ PongLayer::PongLayer()
PongLayer::~PongLayer()
{
_ball->release();
}
void PongLayer::resetAndScoreBallForPlayer(int player)
@ -102,7 +100,6 @@ void PongLayer::doStep(float delta)
resetAndScoreBallForPlayer( kLowPlayer );
else if (_ball->getPosition().y < VisibleRect::bottom().y-_ball->radius())
resetAndScoreBallForPlayer( kHighPlayer );
_ball->draw();
}
void PongScene::runThisTest()