void msn_servconn_destroy(MsnServConn *servconn) { g_return_if_fail(servconn != NULL); if (servconn->processing) { servconn->wasted = TRUE; return; } if (servconn->connected) msn_servconn_disconnect(servconn); if (servconn->destroy_cb) servconn->destroy_cb(servconn); if (servconn->httpconn != NULL) msn_httpconn_destroy(servconn->httpconn); g_free(servconn->host); gaim_circ_buffer_destroy(servconn->tx_buf); if (servconn->tx_handler > 0) gaim_input_remove(servconn->tx_handler); msn_cmdproc_destroy(servconn->cmdproc); g_free(servconn); }
static void dispose (GObject *obj) { PecanCmdServer *cmd_conn = CMD_PECAN_NODE (obj); pecan_log ("begin"); if (cmd_conn->cmdproc) { msn_cmdproc_destroy (cmd_conn->cmdproc); cmd_conn->cmdproc = NULL; } G_OBJECT_CLASS (parent_class)->dispose (obj); pecan_log ("end"); }