1
0
Fork 0
forked from wry/wry

all: fix memory leaks

This commit is contained in:
Julian Orth 2022-05-18 22:42:36 +02:00
parent 56e3eee629
commit e5c0916a25
15 changed files with 147 additions and 54 deletions

View file

@ -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>),