MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / destroy

Function destroy

native/watchos/src/scene.rs:186–201  ·  view source on GitHub ↗
(handle: u32)

Source from the content-addressed store, hash-verified

184}
185
186pub fn destroy(handle: u32) {
187 with(|inner| {
188 let existed = if let Some(slot) = inner.nodes.get_mut(handle as usize) {
189 if slot.is_some() { *slot = None; true } else { false }
190 } else { false };
191 if existed { inner.destroyed_queue.push(handle); }
192 // Any node with this as parent becomes a root — flag PARENT dirty
193 // so Swift reparents it.
194 for n in inner.nodes.iter_mut().flatten() {
195 if n.parent == handle {
196 n.parent = 0;
197 n.dirty_flags |= DIRTY_PARENT;
198 }
199 }
200 });
201}
202
203fn mutate<F: FnOnce(&mut Node)>(handle: u32, f: F) {
204 with(|inner| {

Callers 1

bloom_scene_destroy_nodeFunction · 0.85

Calls 4

withFunction · 0.85
get_mutMethod · 0.80
iter_mutMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected