From a60c3eaa208e59de277c587a259879cfc18ec619 Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 22 Jul 2013 10:32:48 +0800 Subject: [PATCH] closed #2415: [OpenAL] Adding one line to delete SimpleAudioEngine singleton in SimpleAudioEngine::end(). --- CocosDenshion/openal/SimpleAudioEngineOpenAL.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CocosDenshion/openal/SimpleAudioEngineOpenAL.cpp b/CocosDenshion/openal/SimpleAudioEngineOpenAL.cpp index 84c9470c65..09e1b49db6 100644 --- a/CocosDenshion/openal/SimpleAudioEngineOpenAL.cpp +++ b/CocosDenshion/openal/SimpleAudioEngineOpenAL.cpp @@ -74,7 +74,7 @@ namespace CocosDenshion static ALuint s_backgroundSource = AL_NONE; - static SimpleAudioEngine *s_engine = 0; + static SimpleAudioEngine *s_engine = nullptr; static int checkALError(const char *funcName) { @@ -207,6 +207,8 @@ namespace CocosDenshion delete it->second; } s_backgroundMusics.clear(); + + CC_SAFE_DELETE(s_engine); } //