Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!think!zaphod.mps.ohio-state.edu!usc!rutgers!att!dptg!ulysses!andante!alice!ark From: ark@alice.UUCP (Andrew Koenig) Newsgroups: comp.lang.c++ Subject: Re: True Virtual Message-ID: <10422@alice.UUCP> Date: 1 Feb 90 14:19:57 GMT References: <4800082@m.cs.uiuc.edu> <4924@drutx.ATT.COM> <10382@alice.UUCP> <4982@drutx.ATT.COM> Organization: AT&T Bell Laboratories, Liberty Corner NJ Lines: 21 In article <4982@drutx.ATT.COM>, kvt@drutx.ATT.COM (TranKV) writes: > What I meant to ask was if the following works: > > class Foo { > public: > Foo () {} > virtual ~Foo () = 0; > ^^^^^^^^^^^^^^^^^^^^ > // ... > }; Remember that when you destroy an object of a derived class, that involves executing the base class destructor too! Therefore, it doesn't make sense to have a pure virtual destructor, as it would preclude destroying objects not only of that class but of any class derived from it. -- --Andrew Koenig ark@europa.att.com