Merge pull request #6304 from dumganhar/iss4568-crash

closed #4568: Application crashes on closing if CC_ENABLE_CACHE_TEXTURE_DATA is enabled.
This commit is contained in:
minggo 2014-04-18 14:00:40 +08:00
commit 0e7280b1ca
2 changed files with 4 additions and 2 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();

View File

@ -43,7 +43,7 @@
NS_CC_BEGIN NS_CC_BEGIN
// helper // helper
bool compareRenderCommand(RenderCommand* a, RenderCommand* b) static bool compareRenderCommand(RenderCommand* a, RenderCommand* b)
{ {
return a->getGlobalOrder() < b->getGlobalOrder(); return a->getGlobalOrder() < b->getGlobalOrder();
} }