You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
-Changed Godot exit to be clean.
-Added more debug information on memory cleanliness on exit (if run with -v) -Fixed several memory leaks, fixes #1731, fixes #755
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user