From owner-freebsd-hackers Sun Jun 1 18:06:35 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id SAA17161 for hackers-outgoing; Sun, 1 Jun 1997 18:06:35 -0700 (PDT) Received: from brickbat8.mindspring.com (brickbat8.mindspring.com [207.69.200.11]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id SAA17155 for ; Sun, 1 Jun 1997 18:06:29 -0700 (PDT) Received: from bogus.mindspring.com (user-37kbsmf.dialup.mindspring.com [207.69.242.207]) by brickbat8.mindspring.com (8.8.5/8.8.5) with SMTP id VAA04590; Sun, 1 Jun 1997 21:06:13 -0400 (EDT) Message-Id: <1.5.4.32.19970602010613.00856120@mindspring.com> X-Sender: kpneal@mindspring.com X-Mailer: Windows Eudora Light Version 1.5.4 (32) Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Sun, 01 Jun 1997 21:06:13 -0400 To: Brian Somers From: "Kevin P. Neal" Subject: Re: Borland 16bit bcc vs cc/gcc (float) Cc: Steve Howe , freebsd-hackers Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk At 01:15 AM 6/1/97 +0100, Brian Somers wrote: >> At 12:03 PM 5/31/97 -0800, Steve Howe wrote: >[.....] >> Who says you always have to use exit()? >> >> In fact, I've observed C++ code that never calls the destructors if you >> exit() of out a program. >[.....] > >Yep, it at least won't call the destructors for the main() stack >vars, no matter how smart the compiler is. What I saw was my C++ program crashing when calling the final return(), but not crashing when I called exit(). I ended up fixing the destructor for one of my classes, so it didn't core dump when the object was destroyed. I never investigated the exact behavior beyond that, if figured "hey, don't use exit() in C++" and let it rest at that. -- XCOMM Kevin P. Neal, Junior, Comp. Sci. - House of Retrocomputing XCOMM mailto:kpneal@pobox.com - http://www.pobox.com/~kpn/ XCOMM kpneal@eos.ncsu.edu Spoken by Keir Finlow-Bates: XCOMM "Good grief, I've just noticed I've typed in a rant. Sorry chaps!"