ctf: use unique_ptr to manage ctf_metadata_decoder lifetime
Introduce the ctf_metadata_decoder_up type, a unique_ptr with a deleter
that calls ctf_metadata_decoder_destroy. Change
ctf_metadata_decoder_create to return a ctf_metadata_decoder_up, and
adjust callers / callees accordingly.
Note that this is temporary, ctf_metadata_decoder is going to be deleted
in a future refactor. But in the mean time, it helps make the callers
use RAII and become more exception-safe.
Change-Id: Ia0e24b425c47b90dc71b10d1c7fd0a3000c89180
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8167
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12270
Tested-by: jenkins <jenkins@lttng.org>
This page took 0.025499 seconds and 4 git commands to generate.