From a4031f6749758977b2934b13fc1fb53a48ab2dfe Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 2 Jul 2015 14:38:08 -0400 Subject: [PATCH] Docs: A stream has no ownership of its trace MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Add a comment to explain why the trace's refcount is not incremented when setting a stream's trace. Signed-off-by: Jérémie Galarneau --- formats/ctf/ir/stream.c | 1 + 1 file changed, 1 insertion(+) diff --git a/formats/ctf/ir/stream.c b/formats/ctf/ir/stream.c index e89b1fcf..047fc292 100644 --- a/formats/ctf/ir/stream.c +++ b/formats/ctf/ir/stream.c @@ -270,6 +270,7 @@ struct bt_ctf_stream *bt_ctf_stream_create( goto end; } + /* A stream has no ownership of its trace (weak ptr) */ stream->trace = trace; bt_ctf_ref_init(&stream->ref_count); stream->packet_context = bt_ctf_field_create( -- 2.34.1