cpp-common: add GCharUP
authorSimon Marchi <simon.marchi@efficios.com>
Sat, 28 May 2022 14:36:08 +0000 (10:36 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 11 Sep 2023 15:24:02 +0000 (11:24 -0400)
commitde719a105a7e6a38e348d5365fbb2b0e692dde80
tree6dafc713a4b3e46e8a4ab3be07de073d60a4454b
parente0a3ddd47246163b70f9764c0f147807ff1fc0ea
cpp-common: add GCharUP

Add GCharUP, a unique_ptr type that wraps a g_char pointer and has a
deleter that calls g_free.  It can be used to provide automatic memory
management of buffers returned by the GLib API.

Change-Id: I9d98be2f972cc008877b55a20eceeb3dce256cdb
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8170
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/10842
Tested-by: jenkins <jenkins@lttng.org>
CI-Build: Philippe Proulx <eeppeliteloop@gmail.com>
src/cpp-common/Makefile.am
src/cpp-common/glib-up.hpp [new file with mode: 0644]
This page took 0.023661 seconds and 4 git commands to generate.