- The game is now free of leaks up to the point just after the wads are loaded.

- Fixed: Although TypeInfos are now deleted at exit, their FlatPointers or ActorInfo
  data was not freed. I chose not to use a destructor to handle this, because then it
  would no longer be a POD type that can be statically initialized.
- Fixed: Aliases were not deleted at exit.
- Fixed: FWadCollection did not free its hash tables, lump info, full names, or the
  list of open files when destroyed.


SVN r85 (trunk)
This commit is contained in:
Randy Heit 2006-05-09 00:02:37 +00:00
commit 748d7bf4b1
9 changed files with 151 additions and 50 deletions

View file

@ -166,6 +166,47 @@ FWadCollection::FWadCollection ()
FWadCollection::~FWadCollection ()
{
if (FirstLumpIndex != NULL)
{
delete[] FirstLumpIndex;
FirstLumpIndex = NULL;
}
if (NextLumpIndex != NULL)
{
delete[] NextLumpIndex;
NextLumpIndex = NULL;
}
if (FirstLumpIndex_FullName != NULL)
{
delete[] FirstLumpIndex_FullName;
FirstLumpIndex_FullName = NULL;
}
if (NextLumpIndex_FullName != NULL)
{
delete[] NextLumpIndex_FullName;
NextLumpIndex_FullName = NULL;
}
if (LumpInfo != NULL)
{
for (DWORD i = 0; i < NumLumps; ++i)
{
if (LumpInfo[i].fullname != NULL)
{
delete[] LumpInfo[i].fullname;
}
}
delete[] LumpInfo;
LumpInfo = NULL;
}
if (Wads != NULL)
{
for (DWORD i = 0; i < NumWads; ++i)
{
delete Wads[i];
}
delete[] Wads;
Wads = NULL;
}
}
//==========================================================================