Destructor in virtual inheritance
<pre><code>class Base{};
class D1:virtual public Base{};
class D2:virtual public Base{};
class DD:public D1,public D2{};

int main(){
    Base *pBase=new DD;
    delete pBase;
}
</code></pre>

<p>This leads to crash, but I modify as below:</p>

<pre><code>class Base{
public:
    virtual ~Base(){};
};

class D1:virtual public Base{
public:
    virtual ~D1(){}
};

class D2:virtual public Base{
public:
    virtual ~D2(){}
};

class DD:public D1,public D2{
};
</code></pre>

<p>Then, it passes, but the default destructor should be the virtual dummy function, isn't it?</p>