Changed: Delete SoundMngr to avoid memory leaks

--HG--
branch : develop
feature/pipeline-tools
kervala 9 years ago
parent 048cd7731f
commit 0c811510d5

@ -1555,7 +1555,8 @@ void postlogInit()
{
nlwarning("init : Error when creating 'SoundMngr' : %s", e.what());
// leak the alocated sound manager...
SoundMngr = 0;
delete SoundMngr;
SoundMngr = NULL;
}
// Play Music just after the SoundMngr is inited

@ -329,7 +329,8 @@ void updateFromClientCfg()
catch(const Exception &e)
{
nlwarning("init : Error when creating 'SoundMngr' : %s", e.what());
SoundMngr = 0;
delete SoundMngr;
SoundMngr = NULL;
}
// re-init with good SFX/Music Volume

@ -478,7 +478,7 @@ void releaseOutGame()
if(SoundMngr)
{
delete SoundMngr;
SoundMngr = 0;
SoundMngr = NULL;
}
// Delete the driver.
@ -573,7 +573,7 @@ void release()
if(SoundMngr)
{
delete SoundMngr;
SoundMngr = 0;
SoundMngr = NULL;
}
// Release the Entities Animation Manager

@ -2381,7 +2381,7 @@ void CUserEntity::updateSound(const TTime &time)
H_AUTO_USE ( RZ_Client_Update_Sound );
// no sound manager, no need to update sound
if (SoundMngr == 0)
if (SoundMngr == NULL)
return;
if (!(StereoHMD && true)) // TODO: ClientCfg.Headphone

Loading…
Cancel
Save