home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!sun-barr!cs.utexas.edu!wupost!darwin.sura.net!uvaarpa!murdoch!uvacs.cs.Virginia.EDU!rad2r
- From: rad2r@uvacs.cs.Virginia.EDU (Robert DeLine)
- Subject: Destructors and exit()
- Message-ID: <1992Sep3.220301.16983@murdoch.acc.Virginia.EDU>
- Sender: usenet@murdoch.acc.Virginia.EDU
- Organization: University of Virginia Computer Science Department
- Date: Thu, 3 Sep 1992 22:03:01 GMT
- Lines: 16
-
-
- Sorry for this novice question, but when I call exit() from a program compiled
- using g++ 2.1, the destructors for my objects don't get called. This doesn't
- surprise me too much, but is this correct? Does the ARM mention what should
- happen when exit() is called? What if the program is ended due to an uncaught
- exception? If destructors _are_ called when leaving via an uncaught exception,
- perhaps this is a better way than calling exit() to leave from deep inside a
- program?
-
- Thanks.
-
-
- --
- Rob DeLine
- Computer Science, University of Virginia
- deline@Virginia.EDU
-