- Fixed: The names in the Depths array in m_options.cpp were never freed.

- Fixed: FDoomEdMap needed a destructor.
- Fixed: Decal animators were never freed.
- Fixed: Colormaps were never freed.
- Fixed: Memory allocated in R_InitTranslationTables() was never freed.
- Fixed: R_InitParticles() allocated way more memory than it needed to. (And the
  particle memory was never freed, either.)
- Fixed: FMetaTable::FreeMeta() should use delete[] to free string metadata.
- Fixed: FConfigFile::ClearCurrentSection() must cast the entry to a char *
  before deleting it, because that's the way it was allocated.
- Fixed definitions of DeadZombieMan and DeadShotgunGuy in doom/deadthings.txt.
  Skip_super resets the dropitem list, so having it after "DropItem None" is
  pointless.
- Fixed: Decorate DropItem information was never freed.
- Fixed: FinishStates() allocated even 0-entry state arrays.
- Fixed: Default actor instances were never freed.
- Fixed: FRandomSoundList never freed its sound list.
- Fixed: Level and cluster strings read from MAPINFO were never freed.
- Fixed: Episode names were never freed.
- Fixed: InverseColormap and GoldColormap were never freed. Since they're always
  allocated, they can just be arrays rather than pointers.
- Fixed: FFont destructor never freed any of the character data or the font's name.
- Fixed: Fonts were not freed at exit.
- Fixed: FStringTable::LoadLanguage() did not call SC_Close().
- Fixed: When using the -iwad parameter, IdentifyVersion() did not release the
  buffer it created to hold the parameter's path.


SVN r88 (trunk)
This commit is contained in:
Randy Heit 2006-05-09 03:40:15 +00:00
commit df17a60f5d
26 changed files with 314 additions and 131 deletions

View file

@ -92,10 +92,22 @@ struct FDecalAnimator
virtual ~FDecalAnimator ();
virtual DThinker *CreateThinker (DBaseDecal *actor, side_t *wall) const = 0;
char *Name;
FName Name;
};
static TArray<FDecalAnimator *> Animators;
class FDecalAnimatorArray : public TArray<FDecalAnimator *>
{
public:
~FDecalAnimatorArray()
{
for (unsigned int i = 0; i < Size(); ++i)
{
delete (*this)[i];
}
}
};
FDecalAnimatorArray Animators;
struct DDecalThinker : public DThinker
{
@ -554,7 +566,7 @@ void FDecalLib::ParseDecalGroup ()
SC_MustGetString ();
if (SC_Compare ("}"))
{
group->Name = copystring (groupName);
group->Name = groupName;
group->SpawnID = decalNum;
AddDecal (group);
break;
@ -835,7 +847,7 @@ void FDecalLib::AddDecal (const char *name, byte num, const FDecalTemplate &deca
FDecalTemplate *newDecal = new FDecalTemplate;
*newDecal = decal;
newDecal->Name = copystring (name);
newDecal->Name = name;
newDecal->SpawnID = num;
AddDecal (newDecal);
}
@ -987,13 +999,11 @@ FDecalLib::FTranslation *FDecalLib::GenerateTranslation (DWORD start, DWORD end)
FDecalBase::FDecalBase ()
{
Name = NULL;
Name = NAME_None;
}
FDecalBase::~FDecalBase ()
{
if (Name != NULL)
delete[] Name;
}
void FDecalTemplate::ApplyToDecal (DBaseDecal *decal, side_t *wall) const
@ -1101,16 +1111,11 @@ const FDecalTemplate *FDecalGroup::GetDecal () const
FDecalAnimator::FDecalAnimator (const char *name)
{
Name = copystring (name);
Name = name;
}
FDecalAnimator::~FDecalAnimator ()
{
if (Name != NULL)
{
delete[] Name;
Name = NULL;
}
}
IMPLEMENT_CLASS (DDecalFader)