__del__ never called?

199 views
Skip to first unread message

MinRK

unread,
Jun 3, 2012, 6:18:00 PM6/3/12
to cython...@googlegroups.com
Is the `__del__` method supposed to be totally ignored by Cython classes?

This case:

cdef class C(object):
    def __del__(self):
        print 'del'
    def __dealloc__(self):
        print 'dealloc'

When I do:

c = C()
del c

I just get 'dealloc'

The docs say that dealloc is the corollary for cinit, which I had interpreted as meaning that del still exists, just as init does.

Same behavior on 0.15.1 and 0.17pre

-MinRK

Czarek Tomczak

unread,
May 20, 2013, 10:59:33 AM5/20/13
to cython...@googlegroups.com
From the documentation:

Note

 

There is no __del__() method for extension types.



Regards,
Czarek
Reply all
Reply to author
Forward
0 new messages