[Cython] Memory leak of memoryview attributes in cdef subclasses

Pauli Virtanen pav at iki.fi
Tue Sep 24 19:43:14 CEST 2013


Hi,

18.09.2013 16:14, Daniel, Bruno kirjoitti:
> We encountered memory leaks when using memoryview attributes in cdef subclasses
> in Cython code. They can be avoided by adding a dealloc method setting the value
> of the memoryview attribute to None. The problem does not occur in topmost
> cdef classes.
> 
> Here's an example: (See the module docstring on how to compile and run the
> example.)

Cannot reproduce the failure on Cython 0.19.1. If you are using an
earlier version, please try that instead.

One bug with memory leaks in cdef classes was fixed in 0.18 IIRC.

-- 
Pauli Virtanen



More information about the cython-devel mailing list