(&mut self)
| 103 | |
| 104 | impl 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 | } |