home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / cplus / 16773 < prev    next >
Encoding:
Text File  |  1992-11-23  |  1023 b   |  28 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!ux1.cso.uiuc.edu!cs.uiuc.edu!sparc0b!pjl
  3. From: pjl@cs.uiuc.edu (Paul Lucas)
  4. Subject: Re: virtual functions need virtual destructors ?
  5. Message-ID: <By6IAD.FD@cs.uiuc.edu>
  6. Sender: news@cs.uiuc.edu
  7. Organization: University of Illinois at Urbana-Champaign
  8. References: <kilitzir.722528914@news.forth.gr>
  9. Date: Mon, 23 Nov 1992 17:08:37 GMT
  10. Lines: 16
  11.  
  12. In <kilitzir.722528914@news.forth.gr> kilitzir@antigone.csi.forth.gr (Xristos Kilitzirakis) writes:
  13.  
  14. >Why do virtual functions need virtual destructors ?
  15.  
  16. *****>    They don't.  A _class_ that has virtual functions often
  17.     requires a virtual d'tor if and only if objects of that class
  18.     are deleted via a pointer to a class that is a base of that
  19.     class so an object of the right size is deleted.
  20.  
  21. >Hope to be easy question.
  22.  
  23. *****>    The answer is also in any C++ book.
  24. -- 
  25.     - Paul J. Lucas                University of Illinois    
  26.       AT&T Bell Laboratories        at Urbana-Champaign
  27.       Naperville, IL            pjl@cs.uiuc.edu
  28.