aboutsummaryrefslogtreecommitdiff
path: root/modules/mono/csharp_script.cpp
diff options
context:
space:
mode:
authorIgnacio Etcheverry2018-01-01 03:04:49 +0100
committerIgnacio Etcheverry2018-01-01 03:05:19 +0100
commitfe391393d4f907f110875e6571d6ba20a102ddee (patch)
tree5d378eaf3db90193fbb68e2f18b7498aa80a20d3 /modules/mono/csharp_script.cpp
parentb271aa48e4e0af3d9abb998ac9c03eae3b65825a (diff)
downloadgodot-fe391393d4f907f110875e6571d6ba20a102ddee.tar.gz
godot-fe391393d4f907f110875e6571d6ba20a102ddee.tar.zst
godot-fe391393d4f907f110875e6571d6ba20a102ddee.zip
Diffstat (limited to 'modules/mono/csharp_script.cpp')
-rw-r--r--modules/mono/csharp_script.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 2de113f05..61dedbf1d 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();