Mono: Change BindingsGenerator singleton to avoid StringName leaks

This commit is contained in:
Ignacio Etcheverry 2018-01-01 03:04:49 +01:00
parent b271aa48e4
commit fe391393d4
4 changed files with 30 additions and 18 deletions

View file

@ -124,6 +124,14 @@ void CSharpLanguage::finish() {
finalizing = true;
#ifdef TOOLS_ENABLED
// Must be here, to avoid StringName leaks
if (BindingsGenerator::singleton) {
memdelete(BindingsGenerator::singleton);
BindingsGenerator::singleton = NULL;
}
#endif
// Release gchandle bindings before finalizing mono runtime
gchandle_bindings.clear();