From: Tom Tromey <tom@tromey.com>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/3][gdb/testsuite] Fix global array cp_class_table_history leak
Date: Fri, 22 May 2020 14:12:09 -0600 [thread overview]
Message-ID: <87tv073f1i.fsf@tromey.com> (raw)
In-Reply-To: <20200519162919.GA8981@delia> (Tom de Vries's message of "Tue, 19 May 2020 18:29:20 +0200")
>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
Tom> +# This test-case uses the cp_test_ptype_class cache (by means of the ibid
Tom> +# argument), so initialize and finalize the cache.
Tom> +init_cp_test_ptype_class_cache
Tom> +
Tom> do_tests
Tom> +
Tom> +finish_cp_test_ptype_class_cache
If the users always have to do this init/test/finish thing, then maybe
some kind of wrapper proc would be more appropriate.
Also, it's more robust to use 'catch' to ensure that the cleanup is
always run.
However, is the finish bit needed? If the init proc cleans up all the
state, then it seems unnecessary.
Tom
next prev parent reply other threads:[~2020-05-22 20:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-19 16:29 Tom de Vries
2020-05-22 20:12 ` Tom Tromey [this message]
2020-06-02 13:02 ` Tom de Vries
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tv073f1i.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox