- Removed generational garbage collection from the string pool because it didn't

actually work.
- Turned the list of TabCommands into a TArray because I saw lots of console
  commands in the memory leak report at exit. Then I realized those were actually
  key bindings, so I changed the Bindings and DoubleBindings arrays into FString
  arrays.
- Fixed: FStringCVar was missing a destructor.
- Added TArray::Insert().
- Fixed: TArray::Delete() used memmove().
- Renamed Malloc(), Realloc(), and Calloc() to M_Malloc(), M_Realloc(), and
  M_Calloc() so that the debug versions can be defined as macros.
- Enabled the CRT's memory leak detection in WinMain().
- Moved contents of PO_DeInit() into P_FreeLevelData().
- Removed "PolyBlockMap = NULL;" from P_SetupLevel(), because the P_FreeLevelData()
  call it makes next does the exact same thing, but also freeing it if needed.
- Fixed: Unneeded memcpy in UnpackUserCmd() when ucmd and basis are the same


SVN r75 (trunk)
This commit is contained in:
Randy Heit 2006-05-04 03:49:46 +00:00
commit c8cdb52863
38 changed files with 264 additions and 242 deletions

View file

@ -306,7 +306,7 @@ static const char *IsNum (const char *str)
static FStringProd *NewStringProd (const char *str)
{
FStringProd *prod = (FStringProd *)Malloc (sizeof(FStringProd)+strlen(str));
FStringProd *prod = (FStringProd *)M_Malloc (sizeof(FStringProd)+strlen(str));
prod->Type = PROD_String;
strcpy (prod->Value, str);
return prod;
@ -320,7 +320,7 @@ static FStringProd *NewStringProd (const char *str)
static FStringProd *NewStringProd (size_t len)
{
FStringProd *prod = (FStringProd *)Malloc (sizeof(FStringProd)+len);
FStringProd *prod = (FStringProd *)M_Malloc (sizeof(FStringProd)+len);
prod->Type = PROD_String;
prod->Value[0] = 0;
return prod;
@ -334,7 +334,7 @@ static FStringProd *NewStringProd (size_t len)
static FDoubleProd *NewDoubleProd (double val)
{
FDoubleProd *prod = (FDoubleProd *)Malloc (sizeof(FDoubleProd));
FDoubleProd *prod = (FDoubleProd *)M_Malloc (sizeof(FDoubleProd));
prod->Type = PROD_Double;
prod->Value = val;
return prod;