MCPcopy Create free account
hub / github.com/Recordscript/recordscript / drop

Method drop

libs/scrap/src/x11/capturer.rs:105–114  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

103
104impl Drop for Capturer {
105 fn drop(&mut self) {
106 unsafe {
107 // Detach segment from XCB.
108 xcb_shm_detach(self.display.server().raw(), self.xcbid);
109 // Detach segment from our space.
110 libc::shmdt(self.buffer as *mut _);
111 // Destroy the shared memory segment.
112 libc::shmctl(self.shmid, libc::IPC_RMID, ptr::null_mut());
113 }
114 }
115}

Callers

nothing calls this directly

Calls 2

rawMethod · 0.80
serverMethod · 0.80

Tested by

no test coverage detected