範例
class
Base
{
public
:
~Point();
private
:
int
*field;
};
解決方案
請一律在基礎類別虛擬函數中宣告解構子。
class
Base
{
public
:
virtual
~Point();
private
:
int
*field;
};