-
Jeremy Hylton authored
Fix SF bug #516768 reported by Dave Wallace. Replace use of PyMem_DEL() with PyObject_Del() on object dealloc functions. The use of PyMem_DEL() is incorrect for object deallocation, because it only ever calls the low-level free(). If a custom allocator like pymalloc is used, it needs to be called to free the memory. Also replace bare malloc() and realloc() with PyMem_Malloc() and PyMem_Realloc(). I think this isn't a strict bug fix, but a would be nice. It guarantees that BTrees objects get their memory from the same allocator as the Python core.
b258cbf4