http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59589
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
CC| |janus at gcc dot gnu.org
Summary|[4.9 Regression] Memory |[4.9 Regression] [OOP]
|leak when deallocating |Memory leak when
|polymorphic |deallocating polymorphic
--- Comment #12 from janus at gcc dot gnu.org ---
I can confirm the problem on x86_64-unknown-linux-gnu with a current trunk
build. It is certainly related to finalization, which was introduced in 4.9.
The dump shows that a finalizer routine is called for 'b' upon deallocation:
b._vptr->_final (&desc.7, b._vptr->_size, 0);
However, the finalizer routine apparently misses to properly deallocate the
components.