__weakref__
. For example,
cdef class MyRing: """ There is supposed to be at most one instance of this ring, so we keep a weak reference pointer to it, so it will be deleted from memory when there are no more user references to it. """ cdef object __weakref__
See About this document... for information on suggesting changes.