allow multiple calls to Message.close()
This commit is contained in:
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
- add int64 data type to info parser
|
- add int64 data type to info parser
|
||||||
|
- allow multiple calls to Message.close()
|
||||||
|
|
||||||
## [0.5.1] - 2023-11-05
|
## [0.5.1] - 2023-11-05
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ class Message(metaclass=IterRegistry):
|
|||||||
# we have refernces to methods of this class in self.switch
|
# we have refernces to methods of this class in self.switch
|
||||||
# so we have to erase self.switch, otherwise this instance can't be
|
# so we have to erase self.switch, otherwise this instance can't be
|
||||||
# deallocated by the garbage collector ==> we get a memory leak
|
# deallocated by the garbage collector ==> we get a memory leak
|
||||||
del self.switch
|
self.switch.clear()
|
||||||
|
|
||||||
def inc_counter(self, counter: str) -> None:
|
def inc_counter(self, counter: str) -> None:
|
||||||
self.db.inc_counter(counter)
|
self.db.inc_counter(counter)
|
||||||
|
|||||||
Reference in New Issue
Block a user