为什么调用的是Base析构函数而不是派生类


#include <iostream>
using namespace std;
class Base
{
public:
    ~Base();
};
Base::~Base()
{
    cout << "Base析构函数" << endl;
}
class Derived :public Base {
public:
    Derived();
    ~Derived();
private:
    int* p;
};
Derived::Derived()
{
    p = new int(0);
}
Derived::~Derived()
{
    cout << "Derived析构函数" << endl;
    delete p;
}
void fun(Base* b)
{
    delete b;
}
int main()
{
    Base* b = new Derived();
    fun(b);
    return 0;
}

img

把base的析构函数改成虚拟的