1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00

Discard object references.

This commit is contained in:
Sandu Liviu Catalin 2021-02-05 14:21:53 +02:00
parent 66dca8785c
commit d20726621b

View File

@ -31,23 +31,27 @@ void PvManager::Release()
// ------------------------------------------------------------------------------------------------
void PvManager::Terminate()
{
// Release script objects held by classes
for (auto & c : m_Classes)
{
//c->Release();
}
// Release script objects held by units
for (auto & u : m_Units)
{
//c->Release();
u.second->Release();
}
// Release script objects held by classes
for (auto & c : m_Classes)
{
c.second->Release();
}
// Release script objects held by entries
for (auto & e : m_Entries)
{
//c->Release();
e.second->Release();
}
// Release script objects held by the manager
Release();
// Clear the containers as well
m_Classes.clear();
m_Units.clear();
m_Entries.clear();
}
// ------------------------------------------------------------------------------------------------