You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-19 14:31:59 +00:00
Merge pull request #16927 from neikeq/rework-refcount-notify
Notify instance binding data api of refcount increment/decrement
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user