Hi,
I'm trying to use Boost.Test (dynamic variant) in a dll that also uses MFC.
I'm using the console_test_runner application found in libs/test/tools to
load my dll. My compiler is MSVC v8 and my OS is Windows Vista.
Unfortunately, when the MFC dll gets unloaded prior to shutdown it invokes
the CRT's memory leak detection routine which falsely reports that any
memory allocated by the (yet to be unloaded) unit test framework has been
leaked. Obviously, the problem here is with MFC and searching the 'net will
yield numerous complaints on the topic.
One such search turned up a promising workaround [1] that involves
installing a custom report handler to "swallow" the extraneous memory leak
reports. However it appears this approach is defeated by Boost.Test
installing its own report handler when no debugger is present.
Can anybody suggest a different workaround? The problem effectively renders
Boost.Test unusable in this configuration when MFC is present.
Here is sample code to reproduce the problem:
#define BOOST_TEST_DYN_LINK
#include