ModSystem: properly purge and delete all mods on destruction

This commit is contained in:
Kawe Mazidjatari 2024-09-16 12:14:14 +02:00
parent 10161f5f9e
commit 5bfa34d016

View File

@ -26,10 +26,7 @@ static ConVar modsystem_debug("modsystem_debug", "0", FCVAR_RELEASE, "Debug the
CModSystem::~CModSystem()
{
// clear all allocated mod instances.
FOR_EACH_VEC(m_ModList, i)
{
delete m_ModList.Element(i);
}
m_ModList.PurgeAndDeleteElements();
}
//-----------------------------------------------------------------------------