diff options
Diffstat (limited to 'modules/mono/csharp_script.cpp')
-rw-r--r-- | modules/mono/csharp_script.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 2de113f05d..61dedbf1d7 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -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(); |