Add decorator @gc_no_clear to disable tp_clear slot.
This can be useful if some external objects have to be cleaned up when the Python object dies. Otherwise the cyclic garbage collector may drop the references before the cleanup has any chance to run. Includes documentation and a simple unit test. Discussion: http://article.gmane.org/gmane.comp.python.cython.devel/14986
Showing
tests/run/gc_no_clear.pyx
0 → 100644
Please register or sign in to comment