Skip to content

Commit

Permalink
Possible memory leaks on deattach (#912)
Browse files Browse the repository at this point in the history
Co-authored-by: shel <2@shelru.ru>
  • Loading branch information
afwn90cj93201nixr2e1re and shel committed Dec 6, 2020
1 parent c81f68a commit a4e929e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions amxmodx/meta_api.cpp
Expand Up @@ -776,6 +776,14 @@ void C_ServerDeactivate_Post()
g_plugins.clear();
g_langMngr.Clear();

ArrayHandles.clear();
TrieHandles.clear();
TrieIterHandles.clear();
TrieSnapshotHandles.clear();
DataPackHandles.clear();
TextParsersHandles.clear();
GameConfigHandle.clear();

g_CvarManager.OnPluginUnloaded();

ClearPluginLibraries();
Expand Down Expand Up @@ -1731,6 +1739,14 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
g_plugins.clear();
g_langMngr.Clear();

ArrayHandles.clear();
TrieHandles.clear();
TrieIterHandles.clear();
TrieSnapshotHandles.clear();
DataPackHandles.clear();
TextParsersHandles.clear();
GameConfigHandle.clear();

ClearMessages();

modules_callPluginsUnloaded();
Expand Down

0 comments on commit a4e929e

Please sign in to comment.