From 072c4503c36968cbf318a76bbc8e49a85999366d Mon Sep 17 00:00:00 2001 From: bmanGH Date: Mon, 7 Oct 2013 00:01:56 +0800 Subject: [PATCH] fix direct delete touch object without use release crash bug; --- cocos2dx/platform/CCEGLViewProtocol.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos2dx/platform/CCEGLViewProtocol.cpp b/cocos2dx/platform/CCEGLViewProtocol.cpp index 870146a2f9..985cbb51c7 100644 --- a/cocos2dx/platform/CCEGLViewProtocol.cpp +++ b/cocos2dx/platform/CCEGLViewProtocol.cpp @@ -351,8 +351,8 @@ void EGLViewProtocol::handleTouchesOfEndOrCancel(EventTouch::EventCode eventCode for (auto& touch : touchEvent._touches) { - // delete the touch object. - delete touch; + // release the touch object. + touch->release(); } }