diff --git a/README.md b/README.md index 6648276e4972a05ba30bcba4d7f91bd8d9c64d59..9760fd52170303c9c102facca41aae2349d64333 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,8 @@ Then copy your resulting wheel and install it via pip on the target system. ## v0.6.2 * added the context manager syntax to VarlenIterator +* fixed a memory leak that happened during getting current value + from an empty series ## v0.6.1 diff --git a/setup.cfg b/setup.cfg index 1da873475b866fc4f2edc9be5eb58790b1af268f..3e4aa7c5433a910ae72a0ab5e4a14f44da6c2622 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ # coding: utf-8 [metadata] name = tempsdb -version = 0.6.2a2 +version = 0.6.2a3 long-description = file: README.md long-description-content-type = text/markdown; charset=UTF-8 license_files = LICENSE diff --git a/tempsdb/series.pyx b/tempsdb/series.pyx index eb5171856846a7a4f7941f39c6a9312c92d8fa29..b0ba3981d723b480d4e34e21e117e3c903bf03f5 100644 --- a/tempsdb/series.pyx +++ b/tempsdb/series.pyx @@ -47,13 +47,12 @@ cdef class TimeSeries: cdef: Iterator it = self.iterate_range(self.last_chunk.max_ts, self.last_chunk.max_ts) tuple tpl = it.next_item() + it.close() if tpl is None: raise ValueError('Series is empty!') - try: - return tpl - finally: - it.close() + + return tpl cpdef int disable_mmap(self) except -1: """