mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 23:23:14 -04:00
Implement Drop for Proxy on macOS platform (#1526)
This commit is contained in:
@@ -117,6 +117,14 @@ pub struct Proxy<T> {
|
||||
|
||||
unsafe impl<T: Send> Send for Proxy<T> {}
|
||||
|
||||
impl<T> Drop for Proxy<T> {
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
CFRelease(self.source as _);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> Clone for Proxy<T> {
|
||||
fn clone(&self) -> Self {
|
||||
Proxy::new(self.sender.clone())
|
||||
|
||||
Reference in New Issue
Block a user