I have a C extension module for Python.
When the module is initialized, I malloc() some memory that I only use in the C code.
I would like to free this memory when the module is freed.
Python 3 has m_free member on PyModuleDef struct that is exactly what I want. The problem is I cannot find equivalent functionality in Python 2.
How do I free my malloc'd memory in Python 2?