diff options
author | kobewi <kobewi4e@gmail.com> | 2023-11-28 13:19:34 +0100 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2023-11-28 14:01:08 +0100 |
commit | f8f8fe0615ee9e8163df6a5e5994c3bdb5251457 (patch) | |
tree | d73b47642710b514efdab14cb562c370afe2707d /core/io/resource.cpp | |
parent | f82bf35a03502b33e0b3a5987573e3c6987912ce (diff) | |
download | redot-engine-f8f8fe0615ee9e8163df6a5e5994c3bdb5251457.tar.gz |
Improve message about resources in use at exit
Diffstat (limited to 'core/io/resource.cpp')
-rw-r--r-- | core/io/resource.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/io/resource.cpp b/core/io/resource.cpp index 64fa597a67..04ecabaf27 100644 --- a/core/io/resource.cpp +++ b/core/io/resource.cpp @@ -489,12 +489,14 @@ RWLock ResourceCache::path_cache_lock; #endif void ResourceCache::clear() { - if (resources.size()) { - ERR_PRINT("Resources still in use at exit (run with --verbose for details)."); + if (!resources.is_empty()) { if (OS::get_singleton()->is_stdout_verbose()) { + ERR_PRINT(vformat("%d resources still in use at exit.", resources.size())); for (const KeyValue<String, Resource *> &E : resources) { print_line(vformat("Resource still in use: %s (%s)", E.key, E.value->get_class())); } + } else { + ERR_PRINT(vformat("%d resources still in use at exit (run with --verbose for details).", resources.size())); } } |