mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 08:47:17 +01:00
Discard object references.
This commit is contained in:
parent
66dca8785c
commit
d20726621b
@ -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();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user