closed #4568: Application crashes on closing if CC_ENABLE_CACHE_TEXTURE_DATA is enabled.

CC_SAFE_RELEASE(_eventDispatcher); should be after 'delete _renderer;'
in Director's destructor.
This commit is contained in:
James Chen 2014-04-17 10:15:11 +08:00
parent ba38268167
commit 63f54cb5f7
1 changed files with 3 additions and 1 deletions

View File

@ -176,7 +176,7 @@ Director::~Director(void)
CC_SAFE_RELEASE(_notificationNode); CC_SAFE_RELEASE(_notificationNode);
CC_SAFE_RELEASE(_scheduler); CC_SAFE_RELEASE(_scheduler);
CC_SAFE_RELEASE(_actionManager); CC_SAFE_RELEASE(_actionManager);
CC_SAFE_RELEASE(_eventDispatcher);
delete _eventAfterUpdate; delete _eventAfterUpdate;
delete _eventAfterDraw; delete _eventAfterDraw;
@ -189,6 +189,8 @@ Director::~Director(void)
delete _console; delete _console;
#endif #endif
CC_SAFE_RELEASE(_eventDispatcher);
// clean auto release pool // clean auto release pool
PoolManager::destroyInstance(); PoolManager::destroyInstance();