MCPcopy Create free account
hub / github.com/cosdata/cosdata / unload

Method unload

src/models/cache_loader.rs:80–91  ·  view source on GitHub ↗
(&self, item: SharedNode)

Source from the content-addressed store, hash-verified

78
79 #[allow(clippy::not_unsafe_ptr_arg_deref)]
80 pub fn unload(&self, item: SharedNode) -> Result<(), BufIoError> {
81 if item.is_null() {
82 return Ok(());
83 }
84 let item_ref = unsafe { &*item };
85 let combined_index = Self::combine_index(&item_ref.file_index);
86 self.registry.remove(&combined_index);
87 unsafe {
88 drop(Box::from_raw(item));
89 }
90 Ok(())
91 }
92
93 pub fn flush_all(&self, version: VersionNumber) -> Result<(), BufIoError> {
94 self.bufmans.flush_all()?;

Callers

nothing calls this directly

Calls 1

removeMethod · 0.80

Tested by

no test coverage detected