1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Mono/C#: Add error checks to detect possible Reference leaks

This commit is contained in:
Ignacio Etcheverry
2020-01-13 21:00:07 +01:00
parent ea737db43c
commit a6a5ef0fd6
5 changed files with 51 additions and 4 deletions

View File

@@ -115,6 +115,7 @@ MonoObject *unmanaged_get_managed(Object *unmanaged) {
// but the managed instance is alive, the refcount will be 1 instead of 0.
// See: godot_icall_Reference_Dtor(MonoObject *p_obj, Object *p_ptr)
ref->reference();
CSharpLanguage::get_singleton()->post_unsafe_reference(ref);
}
return mono_object;