On 30 Sep, 19:03, Carl Banks <pavlovevide...@gmail.com> wrote:

> Second, CObjects do not have a __del__ method.  They call the supplied
> constructor from the type's tp_dealloc slot.  Use of the tp_dealloc
> slot does not, by itself, prevent cyclic GC.
>
> Bottom line is, the CObject's deallocator is as reliable as a custom
> type's tp_dealloc.

You are right. I did not look at the PyCObject_* API close enough.

I thought of wrapping the CObject with a Python class, and calling the
destructor from __del__. That would be less reliable.

S.M.






-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to