Re: [Boost-users] boost.regex with ICU memory cleanup on windows

John Maddock wrote on Tue, 2 Aug 2011 12:14:53 +0100
I couldn't get u_cleanup() to work anywhere - ie BOOST_AUTO_TEST_CASE( u32_regex ) { { boost::u32regex re( boost::make_u32regex("\\d{3}")); } u_cleanup(); } Or having u_cleanup() in a fixture teardown (which is how it was in the original code) doesn't seem to make any difference
The boost unit test framework does appear to do the memory dump in a destructor of a static object - I guess whether the regex library statics are destructed first depends on the order of loading - not sure if there is any easy way of ensuring that the unit test framework is destructed last (perhaps if I link to UTF as a static library?).
:-) yes I agree - my current solution is --detect_memory_leaks=0 when running the unit tests - which at least stops the report. I was hoping that this was a reasonably common issue and there was some clean up function (like u_cleanup()) specifically for the regex library but if not can live with switching off memory loss detection. Thanks a lot for the help here though - it is much appreciated. Alex
participants (2)
-
Alex Perry
-
John Maddock