void Example_dealloc(TPyExample *self)
{ self->lock.~POrange();
  self->example.~PExample();
  /* Should not call tp_free if it is a reference 
     Destructor is also called by exit proc, not by wrapped */
  if (PyObject_IsPointer(self)) {
    PyObject_GC_UnTrack((PyObject *)self);
    self->ob_type->tp_free((PyObject *)self); 
  }
}
示例#2
0
void DomainDepot_dealloc(TPyDomainDepot *self)
{
    mldelete self->domainDepot;
    /* Should not call tp_free if it is a reference
       Destructor is also called by exit proc, not by wrapped */
    if (PyObject_IsPointer(self)) {
        PyObject_GC_UnTrack((PyObject *)self);
        self->ob_type->tp_free((PyObject *)self);
    }
}