allow multiple calls to Message.close()

This commit is contained in:
Stefan Allius
2023-11-08 18:57:56 +01:00
parent 02861f70af
commit 714dd92f35
2 changed files with 2 additions and 1 deletions

View File

@@ -110,7 +110,7 @@ class Message(metaclass=IterRegistry):
# we have refernces to methods of this class in self.switch
# so we have to erase self.switch, otherwise this instance can't be
# deallocated by the garbage collector ==> we get a memory leak
del self.switch
self.switch.clear()
def inc_counter(self, counter: str) -> None:
self.db.inc_counter(counter)