diff options
-rw-r--r-- | src/resources/resourcemanager/resourcemanager.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/resources/resourcemanager/resourcemanager.cpp b/src/resources/resourcemanager/resourcemanager.cpp index b4e80d2c1..765790aac 100644 --- a/src/resources/resourcemanager/resourcemanager.cpp +++ b/src/resources/resourcemanager/resourcemanager.cpp @@ -69,7 +69,9 @@ ResourceManager::~ResourceManager() ResourceIterator iter = mResources.begin(); #ifdef DEBUG_LEAKS +#ifdef UNITTESTS bool status(false); +#endif while (iter != mResources.end()) { if (iter->second) @@ -79,7 +81,9 @@ ResourceManager::~ResourceManager() logger->log(std::string("ResourceLeak: ").append( iter->second->getIdPath()).append(" (").append( toString(iter->second->getRefCount())).append(")")); +#ifdef UNITTESTS status = true; +#endif } } ++iter; @@ -642,7 +646,9 @@ void ResourceManager::deleteInstance() logger->log1("clean orphans end"); ResourceIterator iter = resourceManager->mResources.begin(); +#ifdef UNITTESTS bool status(false); +#endif while (iter != resourceManager->mResources.end()) { const Resource *const res = iter->second; @@ -653,7 +659,9 @@ void ResourceManager::deleteInstance() logger->log(std::string("ResourceLeak: ").append( res->getIdPath()).append(" (").append(toString( res->getRefCount())).append(")")); +#ifdef UNITTESTS status = true; +#endif } } ++iter; |