diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-08-06 00:34:04 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-08-08 13:04:47 +0100 |
commit | 5c8a542270ec4e28771baf6b1fe38e5f097d5082 (patch) | |
tree | abdafcc12c6e6e8b697a411fe9cfb3071ce4c61a /unotools/source/config/configmgr.cxx | |
parent | 5796909fbdb23553fe20815eed90fa30d2a9a024 (diff) |
dump dangling config item names before assert
Diffstat (limited to 'unotools/source/config/configmgr.cxx')
-rw-r--r-- | unotools/source/config/configmgr.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx index 4f83a861b416..7f411eab6803 100644 --- a/unotools/source/config/configmgr.cxx +++ b/unotools/source/config/configmgr.cxx @@ -122,17 +122,23 @@ ConfigManager::~ConfigManager() { //check list content -> should be empty! #if OSL_DEBUG_LEVEL > 0 - OSL_ENSURE(pMgrImpl->aItemList.empty(), "some ConfigItems are still alive"); -#endif if(!pMgrImpl->aItemList.empty()) { ConfigItemList::iterator aListIter; - for(aListIter = pMgrImpl->aItemList.begin(); aListIter != pMgrImpl->aItemList.end(); ++aListIter) + 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 + OSL_ENSURE(pMgrImpl->aItemList.empty(), "some ConfigItems are still alive"); + if(!pMgrImpl->aItemList.empty()) + { + ConfigItemList::iterator aListIter; + for(aListIter = pMgrImpl->aItemList.begin(); aListIter != pMgrImpl->aItemList.end(); ++aListIter) + { + ConfigItemListEntry_Impl& rEntry = *aListIter; rEntry.pConfigItem->ReleaseConfigMgr(); } pMgrImpl->aItemList.erase(pMgrImpl->aItemList.begin(), pMgrImpl->aItemList.end()); |