Fix possible leaks in graph's current design
[babeltrace.git] / include / babeltrace / graph / connection-internal.h
index ac75320d6cf4480f397eca1780129f068a89866f..2a85296831089a06e3f46bc1d4326b5efbca7abd 100644 (file)
@@ -48,6 +48,12 @@ struct bt_connection {
        struct bt_port *downstream_port;
        /* Upstream port. */
        struct bt_port *upstream_port;
+
+       /*
+        * Weak references to all the notification iterators that were
+        * created on this connection.
+        */
+       GPtrArray *iterators;
 };
 
 static inline
@@ -72,4 +78,8 @@ struct bt_connection *bt_connection_create(struct bt_graph *graph,
 BT_HIDDEN
 void bt_connection_disconnect_ports(struct bt_connection *conn);
 
+BT_HIDDEN
+void bt_connection_remove_iterator(struct bt_connection *conn,
+               struct bt_notification_iterator *iterator);
+
 #endif /* BABELTRACE_COMPONENT_CONNECTION_INTERNAL_H */
This page took 0.025665 seconds and 4 git commands to generate.