Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!ux1.cso.uiuc.edu!csrd.uiuc.edu!s4.csrd.uiuc.edu!turner From: turner@sp1.csrd.uiuc.edu (Steve Turner) Newsgroups: comp.lang.c++ Subject: Re: operator delete -- static AND virtual ???? Message-ID: Date: 30 May 90 21:28:55 GMT References: <401@mole-end.UUCP> <29839@cup.portal.com> <413@mole-end.UUCP> <30161@cup.portal.com> Sender: usenet@csrd.uiuc.edu (news) Reply-To: turner@uicsrd.csrd.uiuc.edu Organization: Center for Supercomputing R & D Lines: 25 In-Reply-To: wmmiller@cup.portal.com's message of 24 May 90 00:48:06 GMT In article <30161@cup.portal.com> wmmiller@cup.portal.com (William Michael Miller) writes: > ..., but it would have made virtual > destructors work like other virtual functions -- virtual destructors are the > only virtual functions for which the name of the overriding function is > *different* from the name of the base class function!) Virtual destructors *don't* work like other virtual functions - but not for the reason that you describe (Well... OK, that too.) Derived virtual dtors do not override the base class's dtor. Instead, they allow a pointer of type (Base *) to invoke the derived class's dtor, when passed to delete. Just wanted to clear that up - this is a small point, but one that several people seem to get wrong. -- Steve Turner (on the Si prairie - UIUC CSRD) ARPANET: turner@uicsrd.csrd.uiuc.edu UUCP: {ihnp4,seismo,pur-ee,convex}!uiucdcs!uicsrd!turner I went walking in the wasted city / Started thinking about entropy Smelled the wind from the ruined river / Went home to watch TV -- Warren Zevon