- Fixed AInventory::PickupFlash setting with GCC.
- Fixed: The MusicVolumes list was allocated with M_Malloc but freed with delete. - Fixed: demobuffer was inconsistantly handled with new[]/delete[] and malloc/free. - Added used memory tracking to M_Malloc() and M_Realloc(). This necessitated the addition of an M_Free() call to track frees. - Removed M_Calloc since it was only used in one place, and can just as well be done with an M_Malloc/memset pair. - Bumped DEMOGAMEVERSION for the new net controller codes. SVN r751 (trunk)
This commit is contained in:
parent
39bff11693
commit
133350fb9c
29 changed files with 182 additions and 98 deletions
|
|
@ -229,7 +229,10 @@ void FCompressedFile::Close ()
|
|||
m_File = NULL;
|
||||
}
|
||||
if (m_Buffer)
|
||||
free (m_Buffer);
|
||||
{
|
||||
M_Free (m_Buffer);
|
||||
m_Buffer = NULL;
|
||||
}
|
||||
BeEmpty ();
|
||||
}
|
||||
|
||||
|
|
@ -372,7 +375,7 @@ void FCompressedFile::Implode ()
|
|||
memcpy (m_Buffer + 8, compressed, outlen);
|
||||
if (compressed)
|
||||
delete[] compressed;
|
||||
free (oldbuf);
|
||||
M_Free (oldbuf);
|
||||
}
|
||||
|
||||
void FCompressedFile::Explode ()
|
||||
|
|
@ -396,7 +399,7 @@ void FCompressedFile::Explode ()
|
|||
r = uncompress (expand, &newlen, m_Buffer + 8, cprlen);
|
||||
if (r != Z_OK || newlen != expandsize)
|
||||
{
|
||||
free (expand);
|
||||
M_Free (expand);
|
||||
I_Error ("Could not decompress cfile");
|
||||
}
|
||||
}
|
||||
|
|
@ -405,7 +408,7 @@ void FCompressedFile::Explode ()
|
|||
memcpy (expand, m_Buffer + 8, expandsize);
|
||||
}
|
||||
if (FreeOnExplode ())
|
||||
free (m_Buffer);
|
||||
M_Free (m_Buffer);
|
||||
m_Buffer = expand;
|
||||
m_BufferSize = expandsize;
|
||||
}
|
||||
|
|
@ -430,7 +433,7 @@ FCompressedMemFile::~FCompressedMemFile ()
|
|||
{
|
||||
if (m_ImplodedBuffer != NULL)
|
||||
{
|
||||
free (m_ImplodedBuffer);
|
||||
M_Free (m_ImplodedBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -672,7 +675,7 @@ FArchive::~FArchive ()
|
|||
if (m_TypeMap)
|
||||
delete[] m_TypeMap;
|
||||
if (m_ObjectMap)
|
||||
free (m_ObjectMap);
|
||||
M_Free (m_ObjectMap);
|
||||
if (m_SpriteMap)
|
||||
delete[] m_SpriteMap;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue