From 2c682380ed816993f80340b2f93c4957cb535072 Mon Sep 17 00:00:00 2001 From: natural-law Date: Sat, 11 Sep 2010 07:48:37 +0000 Subject: [PATCH] issue #143 Clear memory leaks --- cocos2dx/CCDirector.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cocos2dx/CCDirector.cpp b/cocos2dx/CCDirector.cpp index 58ed195727..ffde16305c 100644 --- a/cocos2dx/CCDirector.cpp +++ b/cocos2dx/CCDirector.cpp @@ -41,6 +41,7 @@ THE SOFTWARE. #include "CCBitmapFontAtlas.h" #include "CCActionManager.h" #include "CCLabel.h" +#include "CCConfiguration.h" #if CC_ENABLE_PROFILERS #include "support/CCProfiling.h" @@ -152,6 +153,9 @@ CCDirector::~CCDirector(void) CCX_SAFE_RELEASE(m_pRunningScene); CCX_SAFE_RELEASE(m_pobScenesStack); + // delete configuration pointer + CCConfiguration *conf = CCConfiguration::sharedConfiguration(); + CCX_SAFE_RELEASE(conf); // pop the autorelease pool NSPoolManager::getInstance()->pop();