aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolf480pl <wolf480@interia.pl>2017-02-22 18:30:46 +0100
committerWolf480pl <wolf480@interia.pl>2017-02-22 18:30:46 +0100
commit22b00e02d737bab4086b70b6f73ec5ef0bf54a2a (patch)
treea5f1cb7083932a89d76ab7382e36bc4907929084
parent429dfedb0403a9ec51af171513b5b3d9fbe8f1a6 (diff)
downloadwee-slack-22b00e02d737bab4086b70b6f73ec5ef0bf54a2a.tar.gz
Fix a memleak
-rw-r--r--wee_slack.py3
1 files changed, 3 insertions, 0 deletions
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)