- 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:
parent
d4160f7211
commit
748d7bf4b1
9 changed files with 151 additions and 50 deletions
|
|
@ -64,8 +64,6 @@ static const char *KeyConfCommands[] =
|
|||
"setslot"
|
||||
};
|
||||
|
||||
|
||||
|
||||
static long ParseCommandLine (const char *args, int *argc, char **argv);
|
||||
|
||||
CVAR (Bool, lookspring, true, CVAR_ARCHIVE); // Generate centerview when -mlook encountered?
|
||||
|
|
@ -149,7 +147,32 @@ FActionMap ActionMaps[] =
|
|||
{ 0xf01cb105, &Button_LookUp, "lookup" },
|
||||
};
|
||||
|
||||
#define NUM_ACTIONS (sizeof(ActionMaps)/sizeof(FActionMap))
|
||||
#define NUM_ACTIONS countof(ActionMaps)
|
||||
|
||||
static struct AliasKiller
|
||||
{
|
||||
~AliasKiller()
|
||||
{
|
||||
// Scan the hash table for all aliases and delete them.
|
||||
// Regular commands will be destroyed automatically.
|
||||
for (size_t i = 0; i < countof(Commands); ++i)
|
||||
{
|
||||
FConsoleCommand *cmd = Commands[i];
|
||||
|
||||
while (cmd != NULL)
|
||||
{
|
||||
FConsoleCommand *next = cmd->m_Next;
|
||||
if (cmd->IsAlias())
|
||||
{
|
||||
delete cmd;
|
||||
}
|
||||
cmd = next;
|
||||
}
|
||||
}
|
||||
}
|
||||
} KillTheAliases;
|
||||
|
||||
|
||||
|
||||
IMPLEMENT_CLASS (DWaitingCommand)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue