- 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

@ -308,7 +308,7 @@ int FTextureManager::CreateTexture (int lumpnum, int usetype)
int height;
int width;
foo = (patch_t *)Malloc (data.GetLength());
foo = (patch_t *)M_Malloc (data.GetLength());
data.Seek (-4, SEEK_CUR);
data.Read (foo, data.GetLength());
@ -823,7 +823,7 @@ FTexture::Span **FTexture::CreateSpans (const BYTE *pixels) const
if (!bMasked)
{ // Texture does not have holes, so it can use a simpler span structure
spans = (Span **)Malloc (sizeof(Span*)*Width + sizeof(Span)*2);
spans = (Span **)M_Malloc (sizeof(Span*)*Width + sizeof(Span)*2);
span = (Span *)&spans[Width];
for (int x = 0; x < Width; ++x)
{
@ -867,7 +867,7 @@ FTexture::Span **FTexture::CreateSpans (const BYTE *pixels) const
}
// Allocate space for the spans
spans = (Span **)Malloc (sizeof(Span*)*numcols + sizeof(Span)*numspans);
spans = (Span **)M_Malloc (sizeof(Span*)*numcols + sizeof(Span)*numspans);
// Fill in the spans
for (x = 0, span = (Span *)&spans[numcols], data_p = pixels; x < numcols; ++x)
@ -1271,7 +1271,7 @@ void FPatchTexture::MakeTexture ()
}
// Create the spans
Spans = (Span **)Malloc (sizeof(Span*)*Width + sizeof(Span)*numspans);
Spans = (Span **)M_Malloc (sizeof(Span*)*Width + sizeof(Span)*numspans);
spanstuffer = (Span *)((BYTE *)Spans + sizeof(Span*)*Width);
warned = false;
@ -1393,7 +1393,7 @@ void FPatchTexture::HackHack (int newheight)
}
// Create the spans
Spans = (Span **)Malloc (sizeof(Span *)*Width + sizeof(Span)*Width*2);
Spans = (Span **)M_Malloc (sizeof(Span *)*Width + sizeof(Span)*Width*2);
Span *span = (Span *)&Spans[Width];