From 5786c8aa4131fab6f5ee6da53360bed9b506c210 Mon Sep 17 00:00:00 2001 From: Dhilan007 Date: Mon, 6 Jan 2014 17:31:49 +0800 Subject: [PATCH] fix crash in TouchesTest.cpp on vs --- samples/Cpp/TestCpp/Classes/TouchesTest/TouchesTest.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/samples/Cpp/TestCpp/Classes/TouchesTest/TouchesTest.cpp b/samples/Cpp/TestCpp/Classes/TouchesTest/TouchesTest.cpp index d46d4a15c2..5f4baf3d37 100644 --- a/samples/Cpp/TestCpp/Classes/TouchesTest/TouchesTest.cpp +++ b/samples/Cpp/TestCpp/Classes/TouchesTest/TouchesTest.cpp @@ -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()