mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 08:47:17 +01:00
Release all script objects from command listeners.
This commit is contained in:
parent
508d968744
commit
59e4b9ad7c
@ -1105,11 +1105,19 @@ public:
|
|||||||
for (Listener * node = s_Head; node != nullptr; node = node->m_Next)
|
for (Listener * node = s_Head; node != nullptr; node = node->m_Next)
|
||||||
{
|
{
|
||||||
node->m_Data.Release();
|
node->m_Data.Release();
|
||||||
|
node->m_OnExec.Release();
|
||||||
|
node->m_OnAuth.Release();
|
||||||
|
node->m_OnPost.Release();
|
||||||
|
node->m_OnFail.Release();
|
||||||
}
|
}
|
||||||
// Go backwards and release resources
|
// Go backwards and release resources
|
||||||
for (Listener * node = s_Head; node != nullptr; node = node->m_Prev)
|
for (Listener * node = s_Head; node != nullptr; node = node->m_Prev)
|
||||||
{
|
{
|
||||||
node->m_Data.Release();
|
node->m_Data.Release();
|
||||||
|
node->m_OnExec.Release();
|
||||||
|
node->m_OnAuth.Release();
|
||||||
|
node->m_OnPost.Release();
|
||||||
|
node->m_OnFail.Release();
|
||||||
}
|
}
|
||||||
// Kinda useless but Squirrel doesn't play nice with loose references
|
// Kinda useless but Squirrel doesn't play nice with loose references
|
||||||
// Better safe than sorry
|
// Better safe than sorry
|
||||||
|
Loading…
Reference in New Issue
Block a user