From be4724ef47322559cd63577e29e3dbc710a1f627 Mon Sep 17 00:00:00 2001 From: fuxiao Date: Fri, 9 Oct 2015 10:07:26 +0800 Subject: [PATCH] issues #14050 ActionManager memory leak --- cocos/2d/CCActionManager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cocos/2d/CCActionManager.cpp b/cocos/2d/CCActionManager.cpp index 226d0972e6..be76608619 100644 --- a/cocos/2d/CCActionManager.cpp +++ b/cocos/2d/CCActionManager.cpp @@ -450,6 +450,11 @@ void ActionManager::update(float dt) { deleteHashElement(_currentTarget); } + //if some node refrence 'target', it's refrence count >= 2 (issues #14050) + else if (_currentTarget->target->getReferenceCount() == 1) + { + deleteHashElement(_currentTarget); + } } // issue #635