示例#1
0
static void
_stream_free(void *object)
{
    rig_pb_stream_t *stream = object;

#ifdef USE_UV
    /* resolve and connect requests take a reference on the stream so
     * we should never try and free a stream in these cases... */
    c_return_if_fail(stream->resolving == false);
    c_return_if_fail(stream->connecting == false);
#endif

    rig_pb_stream_disconnect(stream);

    if (stream->type == STREAM_TYPE_BUFFER && stream->buffer.connect_idle) {
        rut_poll_shell_remove_idle_FIXME(stream->shell, stream->buffer.connect_idle);
        stream->buffer.connect_idle = NULL;
    }

    rut_closure_list_disconnect_all_FIXME(&stream->on_connect_closures);
    rut_closure_list_disconnect_all_FIXME(&stream->on_error_closures);

#ifdef USE_UV
    c_free(stream->hostname);
    c_free(stream->port);
#endif

    c_slice_free(rig_pb_stream_t, stream);
}
示例#2
0
void
rig_selection_tool_destroy(rig_selection_tool_t *tool)
{
    c_llist_t *l;

    rut_closure_list_disconnect_all_FIXME(&tool->selection_event_cb_list);

    cg_object_unref(tool->default_pipeline);

    for (l = tool->selected_entities; l; l = l->next)
        entity_state_destroy(l->data);
    c_llist_free(tool->selected_entities);

    c_slice_free(rig_selection_tool_t, tool);
}