Revert "Review feedback: fix memory leak discovered."

This reverts commit 07646f1c82.
This commit is contained in:
Darragh Coy 2014-03-27 15:14:37 -07:00
parent 8ee90389b4
commit 824efceb3f
1 changed files with 1 additions and 1 deletions

View File

@ -566,6 +566,7 @@ void EventDispatcher::removeEventListener(EventListener* listener)
if (_inDispatch == 0)
{
listeners->erase(iter);
CC_SAFE_RELEASE(l);
}
else
{
@ -576,7 +577,6 @@ void EventDispatcher::removeEventListener(EventListener* listener)
}
isFound = true;
CC_SAFE_RELEASE(l);
break;
}
}