Hi, Paolo Coletta wrote:
Is this expected to work? I made some tests and I got an access violation when exiting the main app, in the destructor of default_log_manager_impl(). (I can send a simple test case if needed).
With the current implementation this won't work. The problem is that the log instances do not unregister themselves from the log manager upon destruction. So when the Boost Logging DLL gets unloaded it will try to call a virtual destructor on all registered log instances, but the corresponding vtable pointers could already be invalid if the DLL that contains the logs has already been unloaded. I've already reported this problem to John. The fix for this is easy, you have to unregister logs when they are destroyed, i.e. in their destructor, from the log manager. Best Regards, Martin