• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Destructor and exit()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Destructor and exit()
      • From: "Alexey Proskuryakov" <email@hidden>
References: 
 >Destructor and exit() (From: Eric Shepherd <email@hidden>)
 >Re: Destructor and exit() (From: Markus Hitter <email@hidden>)
 >Re: Destructor and exit() (From: "Alexey Proskuryakov" <email@hidden>)

  • Prev by Date: re: can C++ object use Object C objects?
  • Next by Date: Re: Destructor and exit()
  • Previous by thread: Re: Destructor and exit()
  • Next by thread: Re: Destructor and exit()
  • Index(es):
    • Date
    • Thread