Commit 654bc2e3 authored by Xavier Thompson's avatar Xavier Thompson

Fix keys and values needing decref on cypclass dict destruction

parent 5b33e064
...@@ -249,6 +249,11 @@ cdef cypclass cypdict[K, V]: ...@@ -249,6 +249,11 @@ cdef cypclass cypdict[K, V]:
__init__(self): __init__(self):
self._active_iterators.store(0) self._active_iterators.store(0)
__dealloc__(self):
for item in self._items:
Cy_DECREF(item.first)
Cy_DECREF(item.second)
V __getitem__(self, const key_type key) except ~: V __getitem__(self, const key_type key) except ~:
it = self._indices.find(key) it = self._indices.find(key)
end = self._indices.end() end = self._indices.end()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment