Clear Services Map during VM Shutdown

This commit is contained in:
Ricardo Luís Vaz Silva 2023-06-28 14:28:07 -03:00 committed by Christoph Oelckers
commit 71d4eb66f2
2 changed files with 10 additions and 2 deletions

View file

@ -231,6 +231,8 @@ void PClass::StaticInit ()
//
//==========================================================================
void ClearServices();
void PClass::StaticShutdown ()
{
if (WP_NOCHANGE != nullptr)
@ -238,6 +240,7 @@ void PClass::StaticShutdown ()
delete WP_NOCHANGE;
}
ClearServices();
// delete all variables containing pointers to script functions.
for (auto p : FunctionPtrList)
{