Manage calls to calloc/free through Cython
copied from conda-forge / cymemcymem provides two small memory-management helpers for Cython. They make it easy to tie memory to a Python object’s life-cycle, so that the memory is freed when the object is garbage collected.