diff options
Diffstat (limited to 'modules/mono/glue/cs_files')
-rw-r--r-- | modules/mono/glue/cs_files/Array.cs | 5 | ||||
-rw-r--r-- | modules/mono/glue/cs_files/Dictionary.cs | 5 | ||||
-rw-r--r-- | modules/mono/glue/cs_files/Object.base.cs | 11 |
3 files changed, 9 insertions, 12 deletions
diff --git a/modules/mono/glue/cs_files/Array.cs b/modules/mono/glue/cs_files/Array.cs index 8e337dd9b1..c80cb7cc83 100644 --- a/modules/mono/glue/cs_files/Array.cs +++ b/modules/mono/glue/cs_files/Array.cs @@ -55,11 +55,6 @@ namespace Godot.Collections public void Dispose() { - Dispose(true); - } - - protected virtual void Dispose(bool disposing) - { if (disposed) return; diff --git a/modules/mono/glue/cs_files/Dictionary.cs b/modules/mono/glue/cs_files/Dictionary.cs index 57a476cb23..523e48c31a 100644 --- a/modules/mono/glue/cs_files/Dictionary.cs +++ b/modules/mono/glue/cs_files/Dictionary.cs @@ -59,11 +59,6 @@ namespace Godot.Collections public void Dispose() { - Dispose(true); - } - - protected virtual void Dispose(bool disposing) - { if (disposed) return; diff --git a/modules/mono/glue/cs_files/Object.base.cs b/modules/mono/glue/cs_files/Object.base.cs index 5d62d0b335..30490a715f 100644 --- a/modules/mono/glue/cs_files/Object.base.cs +++ b/modules/mono/glue/cs_files/Object.base.cs @@ -54,7 +54,11 @@ namespace Godot if (memoryOwn) { memoryOwn = false; - godot_icall_Object_Dtor(this, ptr); + godot_icall_Reference_Disposed(this, ptr, !disposing); + } + else + { + godot_icall_Object_Disposed(this, ptr); } this.ptr = IntPtr.Zero; @@ -72,7 +76,10 @@ namespace Godot internal extern static IntPtr godot_icall_Object_Ctor(Object obj); [MethodImpl(MethodImplOptions.InternalCall)] - internal extern static void godot_icall_Object_Dtor(object obj, IntPtr ptr); + internal extern static void godot_icall_Object_Disposed(Object obj, IntPtr ptr); + + [MethodImpl(MethodImplOptions.InternalCall)] + internal extern static void godot_icall_Reference_Disposed(Object obj, IntPtr ptr, bool isFinalizer); // Used by the generated API [MethodImpl(MethodImplOptions.InternalCall)] |