MCPcopy Index your code
hub / github.com/RustPython/RustPython / drop

Method drop

crates/stdlib/src/mmap.rs:229–242  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

227 #[cfg(windows)]
228 impl Drop for NamedMmap {
229 fn drop(&mut self) {
230 unsafe {
231 if !self.view_ptr.is_null() {
232 UnmapViewOfFile(
233 windows_sys::Win32::System::Memory::MEMORY_MAPPED_VIEW_ADDRESS {
234 Value: self.view_ptr as *mut _,
235 },
236 );
237 }
238 if !self.map_handle.is_null() {
239 CloseHandle(self.map_handle);
240 }
241 }
242 }
243 }
244
245 #[derive(Debug)]

Callers

nothing calls this directly

Calls 3

UnmapViewOfFileFunction · 0.85
CloseHandleFunction · 0.85
close_handleMethod · 0.80

Tested by

no test coverage detected