From bf2e8fadd8b861e9606ab24dcd7e253d8daedd3f Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 28 May 2014 08:49:10 +0200 Subject: [PATCH] dlclose confuses LeakSanitizer ...so just do not bother unloading the protector libs again Change-Id: I33caa7beaac3b5e6c4a4836061def24fc5372b70 --- sal/cppunittester/cppunittester.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx index b42bf3a4d7ce..0c5a2a1a4f40 100644 --- a/sal/cppunittester/cppunittester.cxx +++ b/sal/cppunittester/cppunittester.cxx @@ -48,7 +48,6 @@ #include "cppunit/portability/Stream.h" #include "boost/noncopyable.hpp" -#include "boost/ptr_container/ptr_vector.hpp" #include #include "boost/static_assert.hpp" @@ -273,7 +272,6 @@ SAL_IMPLEMENT_MAIN() { #endif #endif - boost::ptr_vector modules; std::vector protectors; CppUnit::TestResult result; std::string args; @@ -303,8 +301,9 @@ SAL_IMPLEMENT_MAIN() { rtl::OUString lib(getArgument(index + 1)); rtl::OUString sym(getArgument(index + 2)); #ifndef DISABLE_DYNLOADING - modules.push_back(new osl::Module(lib, SAL_LOADMODULE_GLOBAL)); - oslGenericFunction fn = modules.back().getFunctionSymbol(sym); + osl::Module mod(lib, SAL_LOADMODULE_GLOBAL); + oslGenericFunction fn = mod.getFunctionSymbol(sym); + mod.release(); #else oslGenericFunction fn = 0; if (sym == "unoexceptionprotector")