- fixed: The TouchedActors array in the Dehacked parser was not freed after parsing was done.
- Initialize the alt HUD explicitly in D_DoomMain. - don't let S_UnloadReverbDef leave a broken list of sound environments behind. - Added more code to explicitly delete data before initializing it. SVN r3039 (trunk)
This commit is contained in:
parent
22372fff25
commit
770a879f6a
25 changed files with 156 additions and 38 deletions
|
|
@ -587,6 +587,7 @@ void S_ParseReverbDef ()
|
|||
int lump, lastlump = 0;
|
||||
|
||||
atterm (S_UnloadReverbDef);
|
||||
S_UnloadReverbDef ();
|
||||
|
||||
while ((lump = Wads.FindLump ("REVERBS", &lastlump)) != -1)
|
||||
{
|
||||
|
|
@ -597,15 +598,21 @@ void S_ParseReverbDef ()
|
|||
void S_UnloadReverbDef ()
|
||||
{
|
||||
ReverbContainer *probe = Environments;
|
||||
ReverbContainer **pNext = NULL;
|
||||
|
||||
while (probe != NULL)
|
||||
{
|
||||
ReverbContainer *next = probe->Next;
|
||||
if (!probe->Builtin)
|
||||
{
|
||||
if (pNext != NULL) *pNext = probe->Next;
|
||||
delete[] const_cast<char *>(probe->Name);
|
||||
delete probe;
|
||||
}
|
||||
else
|
||||
{
|
||||
pNext = &probe->Next;
|
||||
}
|
||||
probe = next;
|
||||
}
|
||||
Environments = &Off;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue