From fdaa2920eb21fff3320a17e9239e04dfadecdb00 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 18 Apr 2015 14:38:54 -0300 Subject: Updated copyright year in all headers --- core/object.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/object.cpp') diff --git a/core/object.cpp b/core/object.cpp index 46f536520d..0bc2b7ee41 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 */ -- cgit v1.2.3 From 59154cccf9fcf814a21a2596993fb1b6777d3bb7 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 20 Apr 2015 19:38:02 -0300 Subject: -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 --- core/object.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'core/object.cpp') diff --git a/core/object.cpp b/core/object.cpp index 0bc2b7ee41..07e24655c2 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -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(); -- cgit v1.2.3