Re: Destructor and exit()
Re: Destructor and exit()
- Subject: Re: Destructor and exit()
- From: Steve Checkoway <email@hidden>
- Date: Sun, 4 Sep 2005 02:11:27 -0700
On Sep 3, 2005, at 10:09 AM, Alexey Proskuryakov wrote:
#include <stdio.h>
#include <stdlib.h>
struct S {
S() { printf("ctor\n"); }
~S() { printf("dtor\n"); }
};
S s;
int main()
{
static S s;
exit(0);
}
That's happening with static objects. If you remove 'static,' you get
$ ./a.out
ctor
ctor
dtor
- Steve
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden