RFR (XS): 8017578 : Hotspot compilation error with latest Studio compiler

David Chase david.r.chase at oracle.com
Thu Jul 4 12:13:48 PDT 2013


On 2013-07-02, at 5:31 PM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:

> I am fine to make base destructor virtual. My question is why we need these destructors at all if they are all empty?

Removing the destructors does not help; I tried that, and I still got the "polymorphic needs virtual destructor".
I think the reasoning is a subclass with an interesting destructor could always be created,
and if that happened then delete of a base class (with "no" destructor) would fail to run the subclass destructor
and that could lead to leaks.

So I did try getting rid of destructors, (including Form, MatchNode, and MatchRule, as well as others in that hierarchy)
and the message did not go away.

David



More information about the hotspot-compiler-dev mailing list