File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
addons/sourcemod/scripting Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 11/*
22* Spray Exploit Fixer
3- * Copyright (C) 2023 Silvers
3+ * Copyright (C) 2024 Silvers
44*
55* This program is free software: you can redistribute it and/or modify
66* it under the terms of the GNU General Public License as published by
1818
1919
2020
21- #define PLUGIN_VERSION " 2.24 "
21+ #define PLUGIN_VERSION " 2.25 "
2222
2323/* =======================================================================================
2424 Plugin Info:
3131
3232========================================================================================
3333 Change Log:
34+
35+ 2.25 (28-Jan-2024)
36+ - Fixed memory leak caused by clearing StringMap/ArrayList data instead of deleting.
34372.24 (17-Jul-2023)
3538 - Now less check of GetClientAuthId by storing them. Thanks to ".Rushaway".
3639
@@ -423,8 +426,13 @@ public void OnClientDisconnect(int client)
423426public void OnMapEnd ()
424427{
425428 MoveSprays ();
426- g_smReceive .Clear ();
427- g_smWaiting .Clear ();
429+ // .Clear() is creating a memory leak
430+ // g_smReceive.Clear();
431+ // g_smWaiting.Clear();
432+ delete g_smReceive ;
433+ delete g_smWaiting ;
434+ g_smReceive = new StringMap ();
435+ g_smWaiting = new StringMap ();
428436
429437 for ( int i = 1 ; i <= MaxClients ; i ++ )
430438 {
You can’t perform that action at this time.
0 commit comments