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

Method free_instance_binding

core/object/object.cpp:2165–2186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2163}
2164
2165void Object::free_instance_binding(void *p_token) {
2166 bool found = false;
2167 MutexLock instance_binding_lock(_instance_binding_mutex);
2168 for (uint32_t i = 0; i < _instance_binding_count; i++) {
2169 if (!found && _instance_bindings[i].token == p_token) {
2170 if (_instance_bindings[i].free_callback) {
2171 _instance_bindings[i].free_callback(_instance_bindings[i].token, this, _instance_bindings[i].binding);
2172 }
2173 found = true;
2174 }
2175 if (found) {
2176 if (i + 1 < _instance_binding_count) {
2177 _instance_bindings[i] = _instance_bindings[i + 1];
2178 } else {
2179 _instance_bindings[i] = { nullptr };
2180 }
2181 }
2182 }
2183 if (found) {
2184 _instance_binding_count--;
2185 }
2186}
2187
2188#ifdef TOOLS_ENABLED
2189void Object::clear_internal_extension() {

Callers 3

finalizeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected