#include <iostream>
using namespace std;
class A
{
public:
A()
{
cout<<"The constructor in operation."<<endl;
}
~A()
{
cout<<"Destructor function in operation."<<endl;
}
};
void main()
{
A *p1=new A;
// delete p1; 此句删除,将不执行析构函数,浪费了内存空间.
}