From bc387477ce62afa6d248ce500bc293830b181063 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Tue, 20 Jan 2026 00:34:10 +0500 Subject: [PATCH] engine: common: fix world submodels were not being purged correctly, leading to a "memory leak" --- engine/common/model.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/common/model.c b/engine/common/model.c index ca06b5d2..8eb47236 100644 --- a/engine/common/model.c +++ b/engine/common/model.c @@ -62,7 +62,7 @@ static void Mod_Modellist_f( void ) } Con_Printf( "-----------------------------------\n" ); - Con_Printf( "%i total models\n", nummodels ); + Con_Printf( "%i total models, %i total allocated slots\n", nummodels, mod_numknown ); Con_Printf( "\n" ); } @@ -443,8 +443,8 @@ static void Mod_PurgeStudioCache( void ) if( mod_known[i].name[0] == '*' ) Mod_FreeModel( &mod_known[i] ); - - mod_known[i].needload = NL_FREE_UNUSED; + else + mod_known[i].needload = NL_FREE_UNUSED; } Mem_EmptyPool( com_studiocache );