all: fix memory leaks
This commit is contained in:
parent
56e3eee629
commit
e5c0916a25
15 changed files with 147 additions and 54 deletions
|
|
@ -46,7 +46,6 @@ use {
|
|||
ffi::{CStr, CString},
|
||||
fmt::{Debug, Formatter},
|
||||
future::pending,
|
||||
mem,
|
||||
rc::Rc,
|
||||
},
|
||||
thiserror::Error,
|
||||
|
|
@ -293,14 +292,6 @@ struct MetalInputDevice {
|
|||
transform_matrix: Cell<Option<TransformMatrix>>,
|
||||
}
|
||||
|
||||
impl Drop for MetalInputDevice {
|
||||
fn drop(&mut self) {
|
||||
if let Some(fd) = self.fd.take() {
|
||||
mem::forget(fd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
enum MetalDevice {
|
||||
Input(Rc<MetalInputDevice>),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue