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

Function drain_destroyed

native/watchos/src/scene.rs:388–398  ·  view source on GitHub ↗

Drain the list of handles destroyed since the last call. Swift pulls these and removes the matching SCNNodes from its retainedNodes map.

(dst: *mut u32, max: i64)

Source from the content-addressed store, hash-verified

386/// Drain the list of handles destroyed since the last call. Swift pulls
387/// these and removes the matching SCNNodes from its retainedNodes map.
388pub fn drain_destroyed(dst: *mut u32, max: i64) -> i64 {
389 if dst.is_null() || max <= 0 { return 0; }
390 with(|inner| {
391 let n = inner.destroyed_queue.len().min(max as usize);
392 unsafe {
393 std::ptr::copy_nonoverlapping(inner.destroyed_queue.as_ptr(), dst, n);
394 }
395 inner.destroyed_queue.drain(..n);
396 n as i64
397 })
398}
399
400pub fn copy_lights(dst: *mut Light, max: i64) -> i64 {
401 if dst.is_null() || max <= 0 { return 0; }

Callers 1

Calls 2

withFunction · 0.85
as_ptrMethod · 0.80

Tested by

no test coverage detected