]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Added CL_Shutdown which took care of 14 memory leaks totaling over 30mb. (needs more...
authortomaz <tomaz@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 1 Jan 2005 21:52:27 +0000 (21:52 +0000)
committertomaz <tomaz@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 1 Jan 2005 21:52:27 +0000 (21:52 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4894 d7cf8633-e32d-0410-b094-e92efae38249

cl_main.c
client.h
host.c

index ca72d8a72aa88dc91582840ba8efff271f9c2724..8f244af96edb799d35343819b7c34dc6113b81ae 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -1300,6 +1300,17 @@ static void CL_TimeRefresh_f (void)
        Con_Printf("%f seconds (%f fps)\n", timedelta, 128/timedelta);
 }
 
+/*
+===========
+CL_Shutdown
+===========
+*/
+void CL_Shutdown (void)
+{
+       Mem_FreePool (&cl_entities_mempool);
+       Mem_FreePool (&cl_refdef_mempool);
+}
+
 /*
 =================
 CL_Init
index d46cecc1536c85afb94ea9681a70d78e96507bc0..c70640e5e18ff0595613bb6fd8774d7d25429e29 100644 (file)
--- a/client.h
+++ b/client.h
@@ -671,6 +671,7 @@ extern void CL_DecayLights (void);
 // cl_main
 //
 
+void CL_Shutdown (void);
 void CL_Init (void);
 
 void CL_EstablishConnection(const char *host);
diff --git a/host.c b/host.c
index a1a9d129ac587f20359b4bd23692fe9adeb16cf2..420984600c76383fdc8386415d8ad2d394ca7c5d 100644 (file)
--- a/host.c
+++ b/host.c
@@ -1023,6 +1023,7 @@ void Host_Shutdown(void)
        }
 
        Cmd_Shutdown();
+       CL_Shutdown();
        Sys_Shutdown();
        Log_Close ();
 }