mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-14 06:34:10 +00:00
Fix lightGridPoints and demo entity joints memory leaks
This commit is contained in:
parent
2335326a6b
commit
cb209718be
2 changed files with 7 additions and 1 deletions
|
@ -164,6 +164,9 @@ void idCommonLocal::StopPlayingRenderDemo()
|
|||
|
||||
readDemo->Close();
|
||||
|
||||
// SRS - free entity joints allocated by demo playback, otherwise will leak
|
||||
R_FreeDerivedData();
|
||||
|
||||
soundWorld->StopAllSounds();
|
||||
soundSystem->SetPlayingSoundWorld( menuSoundWorld );
|
||||
|
||||
|
|
|
@ -57,6 +57,9 @@ void idRenderWorldLocal::FreeWorld()
|
|||
R_StaticFree( portal );
|
||||
}
|
||||
|
||||
// SRS - release the lightGridPoints idList or it will leak
|
||||
area->lightGrid.lightGridPoints.Clear();
|
||||
|
||||
// there shouldn't be any remaining lightRefs or entityRefs
|
||||
if( area->lightRefs.areaNext != &area->lightRefs )
|
||||
{
|
||||
|
@ -1186,4 +1189,4 @@ ResetLocalRenderModels
|
|||
void idRenderWorldLocal::ResetLocalRenderModels()
|
||||
{
|
||||
localModels.Clear(); // Clear out the list when switching between expansion packs, so InitFromMap doesn't try to delete the list whose content has already been deleted by the model manager being re-started
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue