- 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:
parent
201e17082c
commit
df17a60f5d
26 changed files with 314 additions and 131 deletions
|
|
@ -110,6 +110,17 @@ static const byte myislower[256] =
|
|||
|
||||
FFont *FFont::FirstFont = NULL;
|
||||
|
||||
static struct FontsDeleter
|
||||
{
|
||||
~FontsDeleter()
|
||||
{
|
||||
while (FFont::FirstFont != NULL)
|
||||
{
|
||||
delete FFont::FirstFont;
|
||||
}
|
||||
}
|
||||
} DeleteAllTheFonts;
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1310
|
||||
template<> FArchive &operator<< (FArchive &arc, FFont* &font)
|
||||
#else
|
||||
|
|
@ -262,7 +273,7 @@ FFont::~FFont ()
|
|||
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
if (Chars[i].Pic != NULL && Chars[i].Pic->Name == 0)
|
||||
if (Chars[i].Pic != NULL && Chars[i].Pic->Name[0] == 0)
|
||||
{
|
||||
delete Chars[i].Pic;
|
||||
}
|
||||
|
|
@ -280,6 +291,11 @@ FFont::~FFont ()
|
|||
delete[] PatchRemap;
|
||||
PatchRemap = NULL;
|
||||
}
|
||||
if (Name)
|
||||
{
|
||||
delete[] Name;
|
||||
Name = NULL;
|
||||
}
|
||||
|
||||
FFont **prev = &FirstFont;
|
||||
FFont *font = *prev;
|
||||
|
|
@ -559,6 +575,7 @@ FFont::FFont ()
|
|||
Chars = NULL;
|
||||
Ranges = NULL;
|
||||
PatchRemap = NULL;
|
||||
Name = NULL;
|
||||
}
|
||||
|
||||
FSingleLumpFont::FSingleLumpFont (const char *name, int lump)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue