• 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: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help!


  • Subject: Re: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help!
  • From: "James W. Walker" <email@hidden>
  • Date: Sat, 10 Jun 2006 12:19:52 -0700


On Jun 10, 2006, at 11:34 AM, Allen Cronce wrote:

I would have thought that relying on atexit for cleanup of a
non-application executable could result in undefined behavior. Because
you really don't have control over when your bundle is unloaded.

Shouldn't you use a module termination proc or "__attribute__
((destructor))" instead?

Maybe so. I didn't use atexit in my own bundle, I was just trying to make the discussion a little more comprehensive. But for what it's worth, atexit does seem to work OK in a bundle on Tiger.


Note that if ordered construction/destruction is important, you can use
the init_priority attribute:


http://developer.apple.com/documentation/DeveloperTools/gcc-4.0.1/ gcc/C_002b_002b-Attributes.html

That discussion leaves an obvious question unanswered: If object A specifies an init_priority and object B does not specify init_priority, which is constructed first? One doesn't necessarily have control over all the objects, such as the one in <iostream>.
_______________________________________________
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
References: 
 >Re: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help! (From: "Andy O'Meara" <email@hidden>)
 >Re: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help! (From: "James W. Walker" <email@hidden>)
 >Re: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help! (From: Allen Cronce <email@hidden>)

  • Prev by Date: XCode and C++ linking problem
  • Next by Date: Re: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help!
  • Previous by thread: Re: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help!
  • Next by thread: Re: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help!
  • Index(es):
    • Date
    • Thread