This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix memory leak in C++ pretty printer
- From: Jason Merrill <jason at redhat dot com>
- To: Manuel López-Ibáñez <lopezibanez at gmail dot com>, Patrick Palka <patrick at parcs dot ath dot cx>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 20 May 2015 10:42:39 -0400
- Subject: Re: [PATCH] Fix memory leak in C++ pretty printer
- Authentication-results: sourceware.org; auth=none
- References: <1431308052-31361-1-git-send-email-patrick at parcs dot ath dot cx> <5550A8BB dot 1010001 at gmail dot com> <5550ED88 dot 5040103 at redhat dot com> <5550EE77 dot 5060208 at redhat dot com>
On 05/11/2015 02:01 PM, Jason Merrill wrote:
On 05/11/2015 12:57 PM, Jason Merrill wrote:
On 05/11/2015 08:03 AM, Manuel López-Ibáñez wrote:
My preference would be to replace the static with a pointer and
placement-new with proper new and delete
Actually, on second thought, there really doesn't seem to be a need for
that. The patch should be OK; if it doesn't work I'd like to know why.
I think the existing pattern is just a holdover from the C days.
So go ahead and apply the patch. If you would also make the similar fix
to other front ends, that would be great, too.