- 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
|
|
@ -461,7 +461,7 @@ static void ParseAnim (bool istex)
|
|||
sink.Countdown = frames[0].SpeedMin;
|
||||
sink.NumFrames = frames.Size();
|
||||
|
||||
newAnim = (FAnimDef *)Malloc (sizeof(FAnimDef) + (frames.Size()-1)*sizeof(FAnimDef::FAnimFrame));
|
||||
newAnim = (FAnimDef *)M_Malloc (sizeof(FAnimDef) + (frames.Size()-1)*sizeof(FAnimDef::FAnimFrame));
|
||||
*newAnim = sink;
|
||||
|
||||
for (i = 0; i < frames.Size(); ++i)
|
||||
|
|
@ -471,7 +471,7 @@ static void ParseAnim (bool istex)
|
|||
}
|
||||
else
|
||||
{
|
||||
newAnim = (FAnimDef *)Malloc (sizeof(FAnimDef));
|
||||
newAnim = (FAnimDef *)M_Malloc (sizeof(FAnimDef));
|
||||
*newAnim = sink;
|
||||
}
|
||||
|
||||
|
|
@ -588,7 +588,7 @@ void P_InitPicAnims (void)
|
|||
anim.Frames[0].FramePic = anim.BasePic;
|
||||
anim.Countdown = anim.Frames[0].SpeedMin - 1;
|
||||
|
||||
newAnim = (FAnimDef *)Malloc (sizeof(FAnimDef));
|
||||
newAnim = (FAnimDef *)M_Malloc (sizeof(FAnimDef));
|
||||
*newAnim = anim;
|
||||
Anims.Push (newAnim);
|
||||
}
|
||||
|
|
@ -600,7 +600,7 @@ void P_InitPicAnims (void)
|
|||
|
||||
void P_AddSimpleAnim (int picnum, int animcount, int animtype, int animspeed)
|
||||
{
|
||||
FAnimDef *anim = (FAnimDef *)Malloc (sizeof(FAnimDef));
|
||||
FAnimDef *anim = (FAnimDef *)M_Malloc (sizeof(FAnimDef));
|
||||
anim->bUniqueFrames = false;
|
||||
anim->CurFrame = 0;
|
||||
anim->BasePic = picnum;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue