Hi,
I have a question about Python object finalization. I would like to be notified when an Object is deallocated. The problem is I would like to do it in C.
The only way to register a finalizer I found out is to create a weak reference object and give it a callback. But the callback must be a Python function not C. That seems to be too difficult.
Is there any (undocumented) way to do PyObject_RegisterFinalizer(PyObject *o, C-Callback-Func)?
Thanks a lot.
Best Regards,
Tobbi