diff options
author | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2020-01-13 21:00:07 +0100 |
---|---|---|
committer | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2020-01-13 21:00:07 +0100 |
commit | a6a5ef0fd690123d8f646bca47f7ae6e2ad3bbfe (patch) | |
tree | c57f8e5f10dd4f46fce14546024887cbec441d33 /modules/mono/glue | |
parent | ea737db43cba15e5d57442a647e9abcb91ed4ea7 (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.cpp | 1 |
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 { |