[Bug libstdc++/65434] Memory leak in pool constructor
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 16 16:00:00 GMT 2015
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.
More information about the Gcc-bugs
mailing list