summaryrefslogtreecommitdiff
path: root/modules/mono
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mono')
-rw-r--r--modules/mono/csharp_script.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 8fd3626a20..97a1d5c8d8 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -1299,7 +1299,7 @@ GDNativeBool CSharpLanguage::_instance_binding_reference_callback(void *p_token,
MonoGCHandleData &gchandle = script_binding.gchandle;
- int refcount = rc_owner->reference_get_count();
+ int refcount = rc_owner->get_reference_count();
if (!script_binding.inited) {
return refcount == 0;
@@ -1818,7 +1818,7 @@ void CSharpInstance::refcount_incremented() {
RefCounted *rc_owner = Object::cast_to<RefCounted>(owner);
- if (rc_owner->reference_get_count() > 1 && gchandle.is_weak()) { // The managed side also holds a reference, hence 1 instead of 0
+ if (rc_owner->get_reference_count() > 1 && gchandle.is_weak()) { // The managed side also holds a reference, hence 1 instead of 0
// The reference count was increased after the managed side was the only one referencing our owner.
// This means the owner is being referenced again by the unmanaged side,
// so the owner must hold the managed side alive again to avoid it from being GCed.
@@ -1849,7 +1849,7 @@ bool CSharpInstance::refcount_decremented() {
RefCounted *rc_owner = Object::cast_to<RefCounted>(owner);
- int refcount = rc_owner->reference_get_count();
+ int refcount = rc_owner->get_reference_count();
if (refcount == 1 && !gchandle.is_weak()) { // The managed side also holds a reference, hence 1 instead of 0
// If owner owner is no longer referenced by the unmanaged side,
@@ -1995,7 +1995,7 @@ CSharpInstance::~CSharpInstance() {
#ifdef DEBUG_ENABLED
// The "instance binding" holds a reference so the refcount should be at least 2 before `scope_keep_owner_alive` goes out of scope
- CRASH_COND(rc_owner->reference_get_count() <= 1);
+ CRASH_COND(rc_owner->get_reference_count() <= 1);
#endif
}