void qdr_core_free(qdr_core_t *core) { // // Stop and join the thread // core->running = false; sys_cond_signal(core->action_cond); sys_thread_join(core->thread); // // Free the core resources // qdr_core_unsubscribe(core->agent_subscription_mobile); qdr_core_unsubscribe(core->agent_subscription_local); sys_thread_free(core->thread); sys_cond_free(core->action_cond); sys_mutex_free(core->action_lock); sys_mutex_free(core->work_lock); sys_mutex_free(core->id_lock); qd_timer_free(core->work_timer); free(core); }
static void IoAdapter_dealloc(IoAdapter* self) { qdr_core_unsubscribe(self->sub); Py_DECREF(self->handler); self->ob_type->tp_free((PyObject*)self); }