This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] New class allocate_on_obstack
- From: Tom Tromey <tom at tromey dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: gdb-patches at sourceware dot org, tom at tromey dot com
- Date: Wed, 07 Feb 2018 08:29:52 -0700
- Subject: Re: [PATCH] New class allocate_on_obstack
- Authentication-results: sourceware.org; auth=none
- References: <1517996444-8605-1-git-send-email-yao.qi@linaro.org>
>>>>> "Yao" == Yao Qi <qiyaoltc@gmail.com> writes:
Yao> This patch adds a new class allocate_on_obstack, and let dwarf2_per_objfile
Yao> inherit it, so that dwarf2_per_objfile is automatically allocated on
Yao> obstack, and "delete dwarf2_per_objfile" doesn't de-allocate any space.
I still think it should be restricted to types with a trivial
destructor. Otherwise, someday, the lack of actual destruction is going
to cause a bug.
Tom