Browse Source

Free snapshot handle on disconnect / backfill

It's rare (if at all even possible) for a client to have messages in
their StringMap when disconnecting, but we might as well be safe if it
does happen.
nosoop 7 years ago
parent
commit
0aa75f30a2
1 changed files with 3 additions and 1 deletions
  1. 3 1
      scripting/simple-chatprocessor.sp

+ 3 - 1
scripting/simple-chatprocessor.sp

@@ -13,7 +13,7 @@
 
 #pragma newdecls required
 
-#define PLUGIN_VERSION "0.1.3"
+#define PLUGIN_VERSION "0.1.4"
 public Plugin myinfo = {
 	name = "[CSRD] Simple Chat Processor",
 	author = "nosoop (based off of Simple Plugins' implementation)",
@@ -85,6 +85,8 @@ public void OnClientDisconnect(int client) {
 				
 				delete clientList;
 			}
+			delete messages;
+			
 			g_QueuedMessages[client].Clear();
 		}
 		delete g_QueuedMessages[client];