MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / release

Method release

compiler/src/abi.rs:117–126  ·  view source on GitHub ↗

Decrements rc; frees slot at 0. Safe against double-release.

(&mut self, h: u32)

Source from the content-addressed store, hash-verified

115
116 // Decrements rc; frees slot at 0. Safe against double-release.
117 pub fn release(&mut self, h: u32) {
118 if h == 0 { return; }
119 let idx = (h - 1) as usize;
120 if let Some(slot) = self.slots.get_mut(idx)
121 && slot.rc > 0
122 {
123 slot.rc -= 1;
124 if slot.rc == 0 { self.free_list.push(idx as u32); }
125 }
126 }
127}
128
129/* Error stash */

Callers 3

release_handlesFunction · 0.80
with_paused_vmFunction · 0.80
host_edge_releaseFunction · 0.80

Calls 2

get_mutMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected