home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / cplus / 13274 < prev    next >
Encoding:
Text File  |  1992-09-03  |  996 b   |  27 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!sun-barr!cs.utexas.edu!wupost!darwin.sura.net!uvaarpa!murdoch!uvacs.cs.Virginia.EDU!rad2r
  3. From: rad2r@uvacs.cs.Virginia.EDU (Robert DeLine)
  4. Subject: Destructors and exit()
  5. Message-ID: <1992Sep3.220301.16983@murdoch.acc.Virginia.EDU>
  6. Sender: usenet@murdoch.acc.Virginia.EDU
  7. Organization: University of Virginia Computer Science Department
  8. Date: Thu, 3 Sep 1992 22:03:01 GMT
  9. Lines: 16
  10.  
  11.  
  12. Sorry for this novice question, but when I call exit() from a program compiled
  13. using g++ 2.1, the destructors for my objects don't get called.  This doesn't
  14. surprise me too much, but is this correct?  Does the ARM mention what should
  15. happen when exit() is called?  What if the program is ended due to an uncaught
  16. exception?  If destructors _are_ called when leaving via an uncaught exception,
  17. perhaps this is a better way than calling exit() to leave from deep inside a
  18. program?
  19.  
  20. Thanks.
  21.  
  22.  
  23. -- 
  24. Rob DeLine
  25. Computer Science, University of Virginia
  26. deline@Virginia.EDU
  27.