Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES/162.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed reference leak caused by ``Py_INCREF`` because Cython has its own reference counter systems -- by :user:`Vizonex`.
4 changes: 0 additions & 4 deletions src/propcache/_helpers_c.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ cdef class under_cached_property:
if val == NULL:
val = PyObject_CallOneArg(self.wrapped, inst)
PyDict_SetItem(cache, self.name, val)
else:
Py_INCREF(val)
return <object>val

def __set__(self, inst, value):
Expand Down Expand Up @@ -97,8 +95,6 @@ cdef class cached_property:
if val is NULL:
val = PyObject_CallOneArg(self.func, inst)
PyDict_SetItem(cache, self.name, val)
else:
Py_INCREF(val)
return <object>val

__class_getitem__ = classmethod(GenericAlias)
Loading