MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / reference

Method reference

core/object/ref_counted.cpp:66–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66bool RefCounted::reference() {
67 uint32_t rc_val = refcount.refval();
68 bool success = rc_val != 0;
69
70 if (success && rc_val <= 2 /* higher is not relevant */) {
71 if (get_script_instance()) {
72 get_script_instance()->refcount_incremented();
73 }
74 if (_get_extension() && _get_extension()->reference) {
75 _get_extension()->reference(_get_extension_instance());
76 }
77
78 _instance_binding_reference(true);
79 }
80
81 return success;
82}
83
84bool RefCounted::unreference() {
85 uint32_t rc_val = refcount.unrefval();

Callers 2

emit_signalpMethod · 0.45
ref_pointerMethod · 0.45

Calls 2

refvalMethod · 0.80
refcount_incrementedMethod · 0.45

Tested by

no test coverage detected