diff options
Diffstat (limited to 'modules/mono/managed_callable.h')
-rw-r--r-- | modules/mono/managed_callable.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/mono/managed_callable.h b/modules/mono/managed_callable.h index 34963a82ea..4f71e14a2f 100644 --- a/modules/mono/managed_callable.h +++ b/modules/mono/managed_callable.h @@ -42,7 +42,7 @@ class ManagedCallable : public CallableCustom { friend class CSharpLanguage; - Ref<MonoGCHandle> delegate_handle; + MonoGCHandleData delegate_handle; GDMonoMethod *delegate_invoke; #ifdef GD_MONO_HOT_RELOAD @@ -60,7 +60,7 @@ public: ObjectID get_object() const override; void call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, Callable::CallError &r_call_error) const override; - _FORCE_INLINE_ MonoDelegate *get_delegate() { return (MonoDelegate *)delegate_handle->get_target(); } + _FORCE_INLINE_ MonoDelegate *get_delegate() { return (MonoDelegate *)delegate_handle.get_target(); } void set_delegate(MonoDelegate *p_delegate); @@ -71,9 +71,7 @@ public: static constexpr CompareEqualFunc compare_less_func_ptr = &ManagedCallable::compare_less; ManagedCallable(MonoDelegate *p_delegate); -#ifdef GD_MONO_HOT_RELOAD ~ManagedCallable(); -#endif }; #endif // MANAGED_CALLABLE_H |