define __dealloc__ instead of __del__ for cdef-classes to fix memory leak
This fixes memory leak that PR introduced.
According to the Cython documentation, "there is no __del__() method
for extension types".
@@ -87,7 +87,7 @@ cdef class Descriptor:
self.value = descriptor
self.destroy = destroyer
- def __del__(self):
+ def __dealloc__(self):
if self.value:
self.destroy(self.value)
self.value = 0
@@ -532,7 +532,7 @@ cdef class _DescriptorArray:
def __init__(self, destroyer):
self._destroy = destroyer
- def __del__(self):
+ def __dealloc__(self):
for desc in self._value:
self._destroy(desc)
