summaryrefslogtreecommitdiffstats
path: root/modules/mono/mono_gc_handle.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-08-25 11:01:55 -0300
committerGitHub <noreply@github.com>2018-08-25 11:01:55 -0300
commit8c435a343e9739f30cb2e347df95835c91c1ff1a (patch)
treefe53040862deb5bf46d92e1e002086914ff8d80a /modules/mono/mono_gc_handle.cpp
parent7c5883add0b2534bfc901c538381a7b3cba19966 (diff)
parent908a30964a66884f0264021818531cc89c8d2b80 (diff)
downloadredot-engine-8c435a343e9739f30cb2e347df95835c91c1ff1a.tar.gz
Merge pull request #16927 from neikeq/rework-refcount-notify
Notify instance binding data api of refcount increment/decrement
Diffstat (limited to 'modules/mono/mono_gc_handle.cpp')
-rw-r--r--modules/mono/mono_gc_handle.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/mono/mono_gc_handle.cpp b/modules/mono/mono_gc_handle.cpp
index 12109045e0..9f0e933a8c 100644
--- a/modules/mono/mono_gc_handle.cpp
+++ b/modules/mono/mono_gc_handle.cpp
@@ -44,12 +44,12 @@ uint32_t MonoGCHandle::make_weak_handle(MonoObject *p_object) {
Ref<MonoGCHandle> MonoGCHandle::create_strong(MonoObject *p_object) {
- return memnew(MonoGCHandle(make_strong_handle(p_object)));
+ return memnew(MonoGCHandle(make_strong_handle(p_object), STRONG_HANDLE));
}
Ref<MonoGCHandle> MonoGCHandle::create_weak(MonoObject *p_object) {
- return memnew(MonoGCHandle(make_weak_handle(p_object)));
+ return memnew(MonoGCHandle(make_weak_handle(p_object), WEAK_HANDLE));
}
void MonoGCHandle::release() {
@@ -64,9 +64,10 @@ void MonoGCHandle::release() {
}
}
-MonoGCHandle::MonoGCHandle(uint32_t p_handle) {
+MonoGCHandle::MonoGCHandle(uint32_t p_handle, HandleType p_handle_type) {
released = false;
+ weak = p_handle_type == WEAK_HANDLE;
handle = p_handle;
}