[gmpi] Re: Linux C++ question

>On Thu, Feb 24, 2005 at 03:14:21PM +1300, Jeff McClintock wrote:
>> `-fuse-cxa-atexit'
>>      Register destructors for objects with static storage duration with
>>      the `__cxa_atexit' function rather than the `atexit' function.
>>      This option is required for fully standards-compliant handling of
>>      static destructors, but will only work if your C library supports
>>      `__cxa_atexit'.
>> 
>> Would be nice to have standard-complient code.
>
>Sorry, update:  I found a small doc for it.  What's not clear is what to
>do if it is NOT supported?

plugins should not use atexit(). period. 

each platform that supports shared objects/runtime linkage has its own
rules about what happens when the shared object is "unlinked". on
linux, if there is an entry point called "_fini" in the object, it
will be executed. similar conventions exist for win32 and cocoa/darwin.

atexit() is a host-side function designed to queue up work at *host*
exit. it has no useful relationship to anything that a plugin might
want to arrange, or should arrange.

--p

----------------------------------------------------------------------
Generalized Music Plugin Interface (GMPI) public discussion list
Participation in this list is contingent upon your abiding by the
following rules:  Please stay on topic.  You are responsible for your own
words.  Please respect your fellow subscribers.  Please do not
redistribute anyone else's words without their permission.

Archive: http://www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe

Other related posts: