diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/commandhandler.cpp | 14 | ||||
-rw-r--r-- | src/localconsts.h | 1 | ||||
-rw-r--r-- | src/resources/resourcemanager.cpp | 13 |
3 files changed, 16 insertions, 12 deletions
diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp index 6140b398e..d17d2b636 100644 --- a/src/commandhandler.cpp +++ b/src/commandhandler.cpp @@ -1260,13 +1260,19 @@ void showRes(std::string str, ResourceManager::Resources *res) else iter->second->setDumped(true); - if (dynamic_cast<SubImage*>(iter->second)) + SubImage *const subImage = dynamic_cast<SubImage *const>( + iter->second); + Image *const image = dynamic_cast<Image *const>(iter->second); + int id = 0; + if (subImage) type = "S"; - else if (dynamic_cast<Image*>(iter->second)) + else if (image) type = "I"; - logger->log("Resource %s%s: %s (%d)", type.c_str(), + if (image) + id = image->getGLImage(); + logger->log("Resource %s%s: %s (%d) id=%d", type.c_str(), isNew.c_str(), iter->second->getIdPath().c_str(), - iter->second->getRefCount()); + iter->second->getRefCount(), id); } ++ iter; } diff --git a/src/localconsts.h b/src/localconsts.h index 947099668..8b8af420e 100644 --- a/src/localconsts.h +++ b/src/localconsts.h @@ -49,3 +49,4 @@ //#define DEBUG_BIND_TEXTURE 1 //#define DISABLE_RESOURCE_CACHING 1 #define DUMP_LEAKED_RESOURCES 1 +//#define DEBUG_DUMP_LEAKS1 1 diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp index e479a9609..71b5e9a1d 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -241,23 +241,20 @@ void ResourceManager::logResource(const Resource *const res) src += " " + toString(count); if (image && image->getGLImage()) { - logger->log("ResourceManager::release(%s, %u) %s", - res->mIdPath.c_str(), image->getGLImage(), - src.c_str()); + logger->log("resource(%s, %u) %s", res->mIdPath.c_str(), + image->getGLImage(), src.c_str()); } else { - logger->log("ResourceManager::release(%s) %s", - res->mIdPath.c_str(), src.c_str()); + logger->log("resource(%s) %s", res->mIdPath.c_str(), src.c_str()); } } else { - logger->log("ResourceManager::release(%s)", - res->mIdPath.c_str()); + logger->log("resource(%s)", res->mIdPath.c_str()); } #else - logger->log("ResourceManager::release(%s)", res->mIdPath.c_str()); + logger->log("resource(%s)", res->mIdPath.c_str()); #endif } |