diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx index c07a81c7b99a..6704046fad54 100644 --- a/unotools/source/config/configmgr.cxx +++ b/unotools/source/config/configmgr.cxx @@ -47,6 +47,8 @@ #include +#include + //----------------------------------------------------------------------------- using namespace utl; @@ -120,10 +122,7 @@ ConfigManager::ConfigManager(Reference< XMultiServiceFactory > xConfigProv) : ConfigManager::~ConfigManager() { //check list content -> should be empty! -#if OSL_DEBUG_LEVEL > 1 - // I think this is a pointless assertion, the code seems to cope - // fine with it being empty, no need to crash in a dbglevel=1 - // build. +#if OSL_DEBUG_LEVEL > 0 OSL_ENSURE(pMgrImpl->aItemList.empty(), "some ConfigItems are still alive"); #endif if(!pMgrImpl->aItemList.empty()) @@ -132,6 +131,9 @@ ConfigManager::~ConfigManager() for(aListIter = pMgrImpl->aItemList.begin(); aListIter != pMgrImpl->aItemList.end(); ++aListIter) { ConfigItemListEntry_Impl& rEntry = *aListIter; +#if OSL_DEBUG_LEVEL > 0 + fprintf(stderr, "Dangling config item of %s\n", rtl::OUStringToOString(rEntry.pConfigItem->GetSubTreeName(), RTL_TEXTENCODING_UTF8).getStr()); +#endif rEntry.pConfigItem->ReleaseConfigMgr(); } pMgrImpl->aItemList.erase(pMgrImpl->aItemList.begin(), pMgrImpl->aItemList.end());