Oliver wrote:
Could putting the initialization stuff in a class constructor, and instantiating an object of that class before anything else in your main, be of any help?
That's actually what happens. As I wrote in my previous mail, the obvious solution is to deregister log objects (which are static objects) from the log manager in the Boost.Logging DLL when the DLL is unloaded (i.e. in the destructor of the static log object).
with, and I don't know if DLL's are unloaded after all statics destroyed or before or if it's even specified. Anyone know?
Under Windows with MSVC, static objects of a module are destroyed when the module is unloaded. So for static objects in DLLs this happens in DllMain (or more precisely in the DllMain wrapper of the C runtime that calls the user-supplied DllMain) in response to DLL_PROCESS_DETACH. Best Regards, Martin