diff options
Diffstat (limited to 'core/object.cpp')
-rw-r--r-- | core/object.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/core/object.cpp b/core/object.cpp index 46f536520d..07e24655c2 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -33,6 +33,7 @@ #include "message_queue.h" #include "core_string_names.h" #include "translation.h" +#include "os/os.h" #ifdef DEBUG_ENABLED @@ -1728,8 +1729,20 @@ void ObjectDB::cleanup() { GLOBAL_LOCK_FUNCTION; if (instances.size()) { - + WARN_PRINT("ObjectDB Instances still exist!"); + if (OS::get_singleton()->is_stdout_verbose()) { + const uint32_t *K=NULL; + while((K=instances.next(K))) { + + String node_name; + if (instances[*K]->is_type("Node")) + node_name=" - Node Name: "+String(instances[*K]->call("get_name")); + if (instances[*K]->is_type("Resoucre")) + node_name=" - Resource Name: "+String(instances[*K]->call("get_name"))+" Path: "+String(instances[*K]->call("get_path")); + print_line("Leaked Instance: "+String(instances[*K]->get_type())+":"+itos(*K)+node_name); + } + } } instances.clear(); instance_checks.clear(); |