Possible memory leaks on deattach (#912)

Co-authored-by: shel <2@shelru.ru>
This commit is contained in:
shel 2020-12-07 00:09:57 +04:00 committed by GitHub
parent c81f68aac3
commit a4e929eedc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -776,6 +776,14 @@ void C_ServerDeactivate_Post()
g_plugins.clear(); g_plugins.clear();
g_langMngr.Clear(); g_langMngr.Clear();
ArrayHandles.clear();
TrieHandles.clear();
TrieIterHandles.clear();
TrieSnapshotHandles.clear();
DataPackHandles.clear();
TextParsersHandles.clear();
GameConfigHandle.clear();
g_CvarManager.OnPluginUnloaded(); g_CvarManager.OnPluginUnloaded();
ClearPluginLibraries(); ClearPluginLibraries();
@ -1731,6 +1739,14 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
g_plugins.clear(); g_plugins.clear();
g_langMngr.Clear(); g_langMngr.Clear();
ArrayHandles.clear();
TrieHandles.clear();
TrieIterHandles.clear();
TrieSnapshotHandles.clear();
DataPackHandles.clear();
TextParsersHandles.clear();
GameConfigHandle.clear();
ClearMessages(); ClearMessages();
modules_callPluginsUnloaded(); modules_callPluginsUnloaded();