Tomaz made Mem_Free only clear if developer is on, this may speed up engine shutdown
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 21 May 2004 18:56:54 +0000 (18:56 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 21 May 2004 18:56:54 +0000 (18:56 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4218 d7cf8633-e32d-0410-b094-e92efae38249

zone.c

diff --git a/zone.c b/zone.c
index 5c4c5a9..bde6fdf 100644 (file)
--- a/zone.c
+++ b/zone.c
@@ -197,7 +197,8 @@ void _Mem_Free(void *data, const char *filename, int fileline)
        {
 #endif
                pool->realsize -= sizeof(memheader_t) + mem->size + sizeof(int);
-               memset(mem, 0xBF, sizeof(memheader_t) + mem->size + sizeof(int));
+               if (developer.integer)
+                       memset(mem, 0xBF, sizeof(memheader_t) + mem->size + sizeof(int));
                free(mem);
 #if MEMCLUMPING
        }