https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65434

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Dmitry Shachnev from comment #2)
> Will anything bad happen if that memory is freed in the destructor?

Yes, because other destructors could run later, and could (potentially) need to
use the pool after it had been destroyed. That would be undefined behaviour.

> For me, the issue is mostly aesthetic — I got used to not seeing any
> Valgrind warnings in my programs :)

Then add a valgrind suppression, or ask upstream valgrind to add it.

Reply via email to