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

Method init_ref

core/object/ref_counted.cpp:43–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41#include "core/object/script_language.h"
42
43bool RefCounted::init_ref() {
44 if (reference()) {
45 if (!is_referenced() && refcount_init.unref()) {
46 unreference(); // first referencing is already 1, so compensate for the ref above
47 }
48
49 return true;
50 } else {
51 return false;
52 }
53}
54
55void RefCounted::_bind_methods() {
56 ClassDB::bind_method(D_METHOD("init_ref"), &RefCounted::init_ref);

Callers 4

ref_pointerMethod · 0.80
ref_pointerMethod · 0.80

Calls 1

unrefMethod · 0.45

Tested by

no test coverage detected