From f4ca2e493b0fbe2e91293c727ac119c371feffda Mon Sep 17 00:00:00 2001 From: tomaz Date: Sat, 1 Jan 2005 21:52:27 +0000 Subject: [PATCH] Added CL_Shutdown which took care of 14 memory leaks totaling over 30mb. (needs more added to it) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4894 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_main.c | 11 +++++++++++ client.h | 1 + host.c | 1 + 3 files changed, 13 insertions(+) diff --git a/cl_main.c b/cl_main.c index ca72d8a7..8f244af9 100644 --- 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 diff --git a/client.h b/client.h index d46cecc1..c70640e5 100644 --- 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 a1a9d129..42098460 100644 --- a/host.c +++ b/host.c @@ -1023,6 +1023,7 @@ void Host_Shutdown(void) } Cmd_Shutdown(); + CL_Shutdown(); Sys_Shutdown(); Log_Close (); } -- 2.39.2