mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-30 12:50:53 +00:00
Changed: Delete SoundMngr to avoid memory leaks
This commit is contained in:
parent
c57fab9280
commit
46b72b622f
4 changed files with 7 additions and 5 deletions
|
@ -1555,7 +1555,8 @@ void postlogInit()
|
||||||
{
|
{
|
||||||
nlwarning("init : Error when creating 'SoundMngr' : %s", e.what());
|
nlwarning("init : Error when creating 'SoundMngr' : %s", e.what());
|
||||||
// leak the alocated sound manager...
|
// leak the alocated sound manager...
|
||||||
SoundMngr = 0;
|
delete SoundMngr;
|
||||||
|
SoundMngr = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Play Music just after the SoundMngr is inited
|
// Play Music just after the SoundMngr is inited
|
||||||
|
|
|
@ -329,7 +329,8 @@ void updateFromClientCfg()
|
||||||
catch(const Exception &e)
|
catch(const Exception &e)
|
||||||
{
|
{
|
||||||
nlwarning("init : Error when creating 'SoundMngr' : %s", e.what());
|
nlwarning("init : Error when creating 'SoundMngr' : %s", e.what());
|
||||||
SoundMngr = 0;
|
delete SoundMngr;
|
||||||
|
SoundMngr = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// re-init with good SFX/Music Volume
|
// re-init with good SFX/Music Volume
|
||||||
|
|
|
@ -478,7 +478,7 @@ void releaseOutGame()
|
||||||
if(SoundMngr)
|
if(SoundMngr)
|
||||||
{
|
{
|
||||||
delete SoundMngr;
|
delete SoundMngr;
|
||||||
SoundMngr = 0;
|
SoundMngr = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete the driver.
|
// Delete the driver.
|
||||||
|
@ -573,7 +573,7 @@ void release()
|
||||||
if(SoundMngr)
|
if(SoundMngr)
|
||||||
{
|
{
|
||||||
delete SoundMngr;
|
delete SoundMngr;
|
||||||
SoundMngr = 0;
|
SoundMngr = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Release the Entities Animation Manager
|
// Release the Entities Animation Manager
|
||||||
|
|
|
@ -2381,7 +2381,7 @@ void CUserEntity::updateSound(const TTime &time)
|
||||||
H_AUTO_USE ( RZ_Client_Update_Sound );
|
H_AUTO_USE ( RZ_Client_Update_Sound );
|
||||||
|
|
||||||
// no sound manager, no need to update sound
|
// no sound manager, no need to update sound
|
||||||
if (SoundMngr == 0)
|
if (SoundMngr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!(StereoHMD && true)) // TODO: ClientCfg.Headphone
|
if (!(StereoHMD && true)) // TODO: ClientCfg.Headphone
|
||||||
|
|
Loading…
Reference in a new issue