MCPcopy Create free account
hub / github.com/argumentcomputer/ix / rs_refcount_alloc_drop_loop

Function rs_refcount_alloc_drop_loop

crates/ffi/src/refcount.rs:253–265  ·  view source on GitHub ↗
(
  name: LeanIxName<LeanBorrowed<'_>>,
  n: usize,
)

Source from the content-addressed store, hash-verified

251/// Returns the input unchanged. Stresses alloc/dealloc without leaking.
252#[unsafe(no_mangle)]
253pub extern "C" fn rs_refcount_alloc_drop_loop(
254 name: LeanIxName<LeanBorrowed<'_>>,
255 n: usize,
256) -> LeanIxName<LeanOwned> {
257 let decoded = name.decode();
258 for _ in 0..n {
259 let mut cache = LeanBuildCache::new();
260 let _lean_name = LeanIxName::build(&mut cache, &decoded);
261 // _lean_name dropped immediately
262 }
263 let mut cache = LeanBuildCache::new();
264 LeanIxName::build(&mut cache, &decoded)
265}
266
267// =============================================================================
268// Array build and element extraction

Callers

nothing calls this directly

Calls 1

decodeMethod · 0.45

Tested by

no test coverage detected