/* use our own dealloc so we can free a property if we use one */ static void dealloc_obj_dealloc(PyObject *self) { bpy_module_delay_init(((dealloc_obj *)self)->mod); /* Note, for subclassed PyObjects we cant just call PyObject_DEL() directly or it will crash */ dealloc_obj_Type.tp_free(self); }