Re: [Cython] Hooking tp_clear()
Jan. 10, 2019
8:41 a.m.
On 2019-01-09 22:12, Stefan Behnel wrote:
I would like to avoid adding Cython specific features that are better served by the general finalisation mechanism of PEP-442.
That could also be used as argument against @cython.no_gc_clear but we still have that anyway. Second, with PEP-442 you don't have much control over exactly when tp_finalize is called. With tp_dealloc you know for sure that it's called precisely when the object is actually being deallocated (as opposed to planned to be deallocated). For my application, tp_finalize would be too soon: it would put objects in an inconsistent state. And last but not least, PEP-442 doesn't help for Python 2. Jeroen.
2798
Age (days ago)
2798
Last active (days ago)
0 comments
1 participants
participants (1)
-
Jeroen Demeyer