+ struct bt_trace_handle *handle;
+
+ handle = g_hash_table_lookup(ctx->trace_handles,
+ (gpointer) (unsigned long) handle_id);
+ assert(handle != NULL);
+
+ /* Remove from containers */
+ trace_collection_remove(ctx->tc, handle->td);
+ g_hash_table_remove(ctx->trace_handles,
+ (gpointer) (unsigned long) handle_id);
+
+ /* Close the trace */
+ handle->format->close_trace(handle->td);
+
+ /* Destory the handle */
+ bt_trace_handle_destroy(handle);