k******r 发帖数: 2300 | 1 I am trying to answer your questions even though I don't consider a new job at
this time. Also as I mentioned, I am not a C++ expert.
1. delete this is commit suicide. There is many things should be aware.
Probably I can't cover all of them.
first of all, "this" object is not allocated memory by new[] or placement new.
secondly, member function of this can't call any members of "this".
Also, be sure never use "this" after you delete "this".
2. When delete a pointer through base class pointer, de |
|