|
Boost Users : |
From: Martin Ecker (martin.ecker_at_[hidden])
Date: 2005-09-07 11:44:21
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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net