summaryrefslogtreecommitdiff
path: root/modules/mono/glue
diff options
context:
space:
mode:
authorIgnacio Etcheverry <ignalfonsore@gmail.com>2020-01-13 21:00:07 +0100
committerIgnacio Etcheverry <ignalfonsore@gmail.com>2020-01-13 21:00:07 +0100
commita6a5ef0fd690123d8f646bca47f7ae6e2ad3bbfe (patch)
treec57f8e5f10dd4f46fce14546024887cbec441d33 /modules/mono/glue
parentea737db43cba15e5d57442a647e9abcb91ed4ea7 (diff)
Mono/C#: Add error checks to detect possible Reference leaks
Diffstat (limited to 'modules/mono/glue')
-rw-r--r--modules/mono/glue/base_object_glue.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/mono/glue/base_object_glue.cpp b/modules/mono/glue/base_object_glue.cpp
index 04a489f1f9..02246b2f2f 100644
--- a/modules/mono/glue/base_object_glue.cpp
+++ b/modules/mono/glue/base_object_glue.cpp
@@ -108,6 +108,7 @@ void godot_icall_Reference_Disposed(MonoObject *p_obj, Object *p_ptr, MonoBoolea
// Unsafe refcount decrement. The managed instance also counts as a reference.
// See: CSharpLanguage::alloc_instance_binding_data(Object *p_object)
+ CSharpLanguage::get_singleton()->pre_unsafe_unreference(ref);
if (ref->unreference()) {
memdelete(ref);
} else {