Merge pull request #116684 from Calinou/objectdb-instance-leak-warning-tweak
Tweak ObjectDB instance leak warning message to mention object count
This commit is contained in:
commit
c830bf70ce
2 changed files with 5 additions and 2 deletions
|
|
@ -2641,7 +2641,7 @@ void ObjectDB::cleanup() {
|
|||
spin_lock.lock();
|
||||
|
||||
if (slot_count > 0) {
|
||||
WARN_PRINT("ObjectDB instances leaked at exit (run with --verbose for details).");
|
||||
WARN_PRINT(vformat("%d ObjectDB %s leaked at exit (run with `--verbose` for details).", slot_count, slot_count == 1 ? "instance was" : "instances were"));
|
||||
if (OS::get_singleton()->is_stdout_verbose()) {
|
||||
// Ensure calling the native classes because if a leaked instance has a script
|
||||
// that overrides any of those methods, it'd not be OK to call them at this point,
|
||||
|
|
|
|||
|
|
@ -46,7 +46,10 @@ if file_contents.find("ERROR: LeakSanitizer:") != -1:
|
|||
# this possibility should also be handled as a potential error, even if
|
||||
# LeakSanitizer doesn't report anything
|
||||
|
||||
if file_contents.find("ObjectDB instances leaked at exit") != -1:
|
||||
if (
|
||||
file_contents.find("ObjectDB instance was leaked at exit") != -1
|
||||
or file_contents.find("ObjectDB instances were leaked at exit") != -1
|
||||
):
|
||||
print("ERROR: Memory leak was found")
|
||||
sys.exit(54)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue