From 22b00e02d737bab4086b70b6f73ec5ef0bf54a2a Mon Sep 17 00:00:00 2001 From: Wolf480pl Date: Wed, 22 Feb 2017 18:30:46 +0100 Subject: Fix a memleak --- wee_slack.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wee_slack.py b/wee_slack.py index a74dab4..d81659c 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1166,6 +1166,9 @@ class SlackChannel(object): mk = self.messages.keys() mk.sort() for k in mk[:SCROLLBACK_SIZE]: + msg_to_delete = self.messages[k] + if msg_to_delete.hash: + del self.hashed_messages[msg_to_delete.hash] del self.messages[k] def change_message(self, ts, text=None, suffix=None): ts = SlackTS(ts) -- cgit