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

Method remove_singleton

core/config/engine.cpp:382–392  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

380}
381
382void Engine::remove_singleton(const StringName &p_name) {
383 ERR_FAIL_COND(!singleton_ptrs.has(p_name));
384
385 for (List<Singleton>::Element *E = singletons.front(); E; E = E->next()) {
386 if (E->get().name == p_name) {
387 singletons.erase(E);
388 singleton_ptrs.erase(p_name);
389 return;
390 }
391 }
392}
393
394bool Engine::has_singleton(const StringName &p_name) const {
395 return singleton_ptrs.has(p_name);

Callers 3

uninitialize_mcp_moduleFunction · 0.80
unregister_singletonMethod · 0.80

Calls 5

hasMethod · 0.45
frontMethod · 0.45
nextMethod · 0.45
getMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected