Surely the behavior is defined, the derived part of the object is not
destroyed,
so you have memory resource leaks, or is there something else? Ok, I guess
if the derived class managed some thread, the thread may still be running
after
the object was "destroyed" and now could try to access something in the base
class
which is now gone..
"Pete Becker" <pe********@acm.org> wrote in message
news:HI********************@rcn.net...
WittyGuy wrote:
That is without virtual destructor, the base
class destructor alone will be invoked which deletes base class part
alone which is not our intention.
That is often what happens, but technically the behavior is undefined.
So don't rely on this happening.
--
Pete Becker
Dinkumware, Ltd. (http://www.dinkumware.com)