summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--unotools/source/config/configmgr.cxx10
1 files changed, 6 insertions, 4 deletions
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 <list>
+#include <stdio.h>
+
//-----------------------------------------------------------------------------
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());