src.ctf.fs: use unique_ptr to manage ctf_fs_component lifetime
Define ctf_fs_component::UP to be a unique_ptr with a deleter that calls
ctf_fs_destroy. Change ctf_fs_component_create to return a
ctf_fs_component::UP and adjust the appropriate callers / callees.
Move where the ctf_fs_component instance is assigned as the "data" of
the self component. Make it so it's assigned in ctf_fs_init (the
component initialization entry point), as the very last step. This way,
ctf_fs_create can return a unique_ptr, and there's no ambiguity on who
owns the ctf_fs_component instance at any given time, and what happens
in case of failure.
Change-Id: I3ab1d70b0e7aa7772b7fa09deec70db7ea5a022c
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8164
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12266
Tested-by: jenkins <jenkins@lttng.org>
This page took 0.025635 seconds and 4 git commands to generate.