dump offending config entry names

This commit is contained in:
Caolán McNamara 2011-05-20 09:15:21 +01:00
parent 112b79c4b3
commit a907082a4f

View file

@ -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());