Fix Writer memory leak

This commit is contained in:
Jan Trefil 2023-06-21 21:17:40 +02:00
parent 742fb3db7f
commit ec11f26c90

View file

@ -113,6 +113,14 @@ impl Writer {
}
}
impl Drop for Writer {
fn drop(&mut self) {
unsafe {
glue::libevdev_uinput_destroy(self.uinput.as_ptr());
}
}
}
unsafe impl Send for Writer {}
pub struct WriterBuilder {