(&self, item: SharedNode)
| 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()?; |