Re: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help!
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