Пример #1
0
void gd_timer_processor_free_basic(gd_timer_mgr_t mgr, struct gd_timer_processor * data) {
    if (data->m_tl_event) {
        tl_event_free(data->m_tl_event);
        data->m_tl_event = NULL;
    }
    else {
        if (data->m_state == timer_processor_state_InResponserHash) {
            cpe_hash_table_remove_by_ins(&mgr->m_responser_to_processor, data);
            data->m_state = timer_processor_state_NotInResponserHash;
        }

        if (data->m_process_arg_free) data->m_process_arg_free(data->m_process_arg);

        data->m_process_ctx = NULL;
        data->m_process_arg = NULL;
        data->m_process_arg_free = NULL;
        data->m_process_fun = NULL;
    }
}
Пример #2
0
void Event::destory(void) {
    tl_event_t tl_evt = tl_event_from_data((void*)(gd_evt_t)this);
    tl_event_free(tl_evt);
}