You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Mono/C#: Add error checks to detect possible Reference leaks
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user