赋值函数为什么要释放原有的内存资源? delete []m_data;该怎么解决

赋值函数为什么要释放原有的内存资源? delete []m_data;
林锐的高质量程序设计中,第14章:
赋值函数为什么要释放原有的内存资源? delete   []m_data;

------解决方案--------------------
接受新内容之前,当然要先把原来占有的东西善处理好啊。
------解决方案--------------------
class Derived:public Base
{
public:
Derived ():p_test(NULL){}
virtual ~Derived()
{
if(p_test)
delete p_test;
cout < < "Derived::~Derived() " < < endl;
}
//...
private:
char *p_test;
};