Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!dptg!ulysses!andante!alice!ark From: ark@alice.UUCP (Andrew Koenig) Newsgroups: comp.lang.c++ Subject: Re: deleting objects with virtual bases Message-ID: <9890@alice.UUCP> Date: 12 Sep 89 00:08:04 GMT References: <1984@hcr.UUCP> Organization: AT&T Bell Laboratories, Liberty Corner NJ Lines: 11 In article <1984@hcr.UUCP>, stan@hcr.UUCP (Stan Jarzabek) writes: > Is it legal to delete an object with a virtual base through base pointer? Sure, as long as the base class has a virtual destructor. That's true whether the base class is virtual or not -- if class D is derived from B and you use a B* to delete a D object, then B must have a virtual destructor. -- --Andrew Koenig ark@europa.att.com