diff options
| author | Juan Linietsky | 2015-04-20 19:38:02 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2015-04-20 19:38:02 -0300 |
| commit | 59154cccf9fcf814a21a2596993fb1b6777d3bb7 (patch) | |
| tree | 4132620a9d924463dae4b64fea2dde68a14023e7 /core/string_db.cpp | |
| parent | 28c4afeb5733f9ca9725ab2a5f4066af8e02b2a6 (diff) | |
| download | godot-59154cccf9fcf814a21a2596993fb1b6777d3bb7.tar.gz godot-59154cccf9fcf814a21a2596993fb1b6777d3bb7.tar.zst godot-59154cccf9fcf814a21a2596993fb1b6777d3bb7.zip | |
Diffstat (limited to 'core/string_db.cpp')
| -rw-r--r-- | core/string_db.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/core/string_db.cpp b/core/string_db.cpp index 8761551fe..57fdd6e70 100644 --- a/core/string_db.cpp +++ b/core/string_db.cpp @@ -28,7 +28,7 @@ /*************************************************************************/ #include "string_db.h" #include "print_string.h" - +#include "os/os.h" StaticCString StaticCString::create(const char *p_ptr) { StaticCString scs; scs.ptr=p_ptr; return scs; } @@ -55,15 +55,29 @@ void StringName::setup() { void StringName::cleanup() { _global_lock(); + int lost_strings=0; for(int i=0;i<STRING_TABLE_LEN;i++) { while(_table[i]) { _Data*d=_table[i]; - _table[i]=_table[i]->next; + lost_strings++; + if (OS::get_singleton()->is_stdout_verbose()) { + + if (d->cname) { + print_line("Orphan StringName: "+String(d->cname)); + } else { + print_line("Orphan StringName: "+String(d->name)); + } + } + + _table[i]=_table[i]->next; memdelete(d); } } + if (OS::get_singleton()->is_stdout_verbose() && lost_strings) { + print_line("StringName: "+itos(lost_strings)+" unclaimed string names at exit."); + } _global_unlock(); } |
