This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2] gdb: CTF support
On 2019-10-03 1:58 p.m., Wei-min Pan wrote:
> But the `free` call is needed to free up space allocated by libctf's ctf_type_aname_raw.
That's the point of gdb::unique_xmalloc_pointer: it will automatically call xfree (free) when
on scope exit, free'ing this copy. It's preferred to use this instead of manually calling
xfree, because it makes it harder to forget to free the memory (or to free it twice).
Simon