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); } //