cpp-common: add SharedObj::release
It will sometimes be needed to extract the ownership of a lib object
from a SharedObj, and get the underlying lib object pointer. For
example:
- The value returned by queries
- Messages returned by iterators
Add a SharedObj::release method for that. The return type is a borrowed
object (e.g. bt2::Value::Shared::release returns a bt2::Value), but
conceptually the caller then owns the reference and is responsible for
manually managing it.
After a release, a Shared object becomes invalid, same as when it is moved
from.
Change-Id: Id31855512b8dd3d5223f2e759ff48f81ceadbfbf
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8169
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/10825
CI-Build: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
This page took 0.02492 seconds and 4 git commands to generate.