更改一处,多谢@金星凌日 提醒
MyClass &operator=(const MyClass& src) {
cout << "operator=" << endl;
if (&src != this) { // 更改的地方
Dispose();
CopyFrom(src);
}
return *this;
}</code></pre>