- 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:
parent
ea3b76815d
commit
c8cdb52863
38 changed files with 264 additions and 242 deletions
|
|
@ -2853,6 +2853,12 @@ void P_FreeLevelData ()
|
|||
delete[] PolyBlockMap;
|
||||
PolyBlockMap = NULL;
|
||||
}
|
||||
po_NumPolyobjs = 0;
|
||||
if (polyobjs != NULL)
|
||||
{
|
||||
delete[] polyobjs;
|
||||
polyobjs = NULL;
|
||||
}
|
||||
if (rejectmatrix != NULL)
|
||||
{
|
||||
delete[] rejectmatrix;
|
||||
|
|
@ -2951,7 +2957,6 @@ void P_SetupLevel (char *lumpname, int position)
|
|||
|
||||
// [RH] clear out the mid-screen message
|
||||
C_MidPrint (NULL);
|
||||
PolyBlockMap = NULL;
|
||||
|
||||
// Free all level data from the previous map
|
||||
P_FreeLevelData ();
|
||||
|
|
@ -3181,8 +3186,6 @@ void P_SetupLevel (char *lumpname, int position)
|
|||
for (i = 0; i < BODYQUESIZE; i++)
|
||||
bodyque[i] = NULL;
|
||||
|
||||
PO_DeInit (); // Flush polyobjs from previous map
|
||||
|
||||
deathmatchstarts.Clear ();
|
||||
|
||||
if (!buildmap)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue