void Hunk_Clear( void ) { #ifndef DEDICATED CL_ShutdownCGame(); CL_ShutdownUI(); #endif SV_ShutdownGameProgs(); #ifndef DEDICATED CIN_CloseAllVideos(); #endif hunk_tag = TAG_HUNK_MARK1; Z_TagFree(TAG_HUNK_MARK1); Z_TagFree(TAG_HUNK_MARK2); if ( re.HunkClearCrap ) { re.HunkClearCrap(); } // Com_Printf( "Hunk_Clear: reset the hunk ok\n" ); VM_Clear(); //See if any ghoul2 stuff was leaked, at this point it should be all cleaned up. #ifdef _FULL_G2_LEAK_CHECKING assert(g_Ghoul2Allocations == 0 && g_G2ClientAlloc == 0 && g_G2ServerAlloc == 0); if (g_Ghoul2Allocations) { Com_Printf("%i bytes leaked by ghoul2 routines (%i client, %i server)\n", g_Ghoul2Allocations, g_G2ClientAlloc, g_G2ServerAlloc); G2_DEBUG_ReportLeaks(); } #endif }
/* ================= Hunk_Clear The server calls this before shutting down or loading a new map ================= */ void Hunk_Clear( void ) { Z_TagFree(TAG_HUNKALLOC); extern void CIN_CloseAllVideos(); CIN_CloseAllVideos(); extern void R_ClearStuffToStopGhoul2CrashingThings(void); R_ClearStuffToStopGhoul2CrashingThings(); }
/* ================= Hunk_Clear The server calls this before shutting down or loading a new map ================= */ void Hunk_Clear( void ) { Z_TagFree(TAG_HUNKALLOC); Z_TagFree(TAG_HUNKMISCMODELS); extern void CIN_CloseAllVideos(); CIN_CloseAllVideos(); if(re.R_ClearStuffToStopGhoul2CrashingThings) re.R_ClearStuffToStopGhoul2CrashingThings(); }