diff options
author | Ignacio Roldán Etcheverry <neikeq@users.noreply.github.com> | 2022-10-02 19:23:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-02 19:23:44 +0200 |
commit | abf473e2d022accdd5b7aa21d3e0b934b6ec0523 (patch) | |
tree | 72d3dcc6075b0980bf67c76ae6b5c40b230092dc /modules/mono/managed_callable.h | |
parent | e69b7083d45c5d8698508cce7086d361c4b1f44c (diff) | |
parent | 161f295f52d21dea940d7c06e5f83a14beefb4c9 (diff) |
Merge pull request #66674 from pkdawson/fix-callable-delegate
Fix C# delegate signal not disconnected when Object is destroyed
Diffstat (limited to 'modules/mono/managed_callable.h')
-rw-r--r-- | modules/mono/managed_callable.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/mono/managed_callable.h b/modules/mono/managed_callable.h index aa3344f4d5..26cd164fb6 100644 --- a/modules/mono/managed_callable.h +++ b/modules/mono/managed_callable.h @@ -40,6 +40,7 @@ class ManagedCallable : public CallableCustom { friend class CSharpLanguage; GCHandleIntPtr delegate_handle; + ObjectID object_id; #ifdef GD_MONO_HOT_RELOAD SelfList<ManagedCallable> self_instance = this; @@ -66,7 +67,7 @@ public: void release_delegate_handle(); - ManagedCallable(GCHandleIntPtr p_delegate_handle); + ManagedCallable(GCHandleIntPtr p_delegate_handle, ObjectID p_object_id); ~ManagedCallable(); }; |