mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-27 03:56:33 +11:00
Implement Drop
for Proxy
on macOS platform (#1526)
This commit is contained in:
parent
47ff8d61d1
commit
54bc41f68b
2 changed files with 9 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
||||||
- On X11, fix `ResumeTimeReached` being fired too early.
|
- On X11, fix `ResumeTimeReached` being fired too early.
|
||||||
- On Web, replaced zero timeout for `ControlFlow::Poll` with `requestAnimationFrame`
|
- On Web, replaced zero timeout for `ControlFlow::Poll` with `requestAnimationFrame`
|
||||||
- On Web, fix a possible panic during event handling
|
- On Web, fix a possible panic during event handling
|
||||||
|
- On macOS, fix `EventLoopProxy` leaking memory for every instance.
|
||||||
|
|
||||||
# 0.22.0 (2020-03-09)
|
# 0.22.0 (2020-03-09)
|
||||||
|
|
||||||
|
|
|
@ -117,6 +117,14 @@ pub struct Proxy<T> {
|
||||||
|
|
||||||
unsafe impl<T: Send> Send for 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> {
|
impl<T> Clone for Proxy<T> {
|
||||||
fn clone(&self) -> Self {
|
fn clone(&self) -> Self {
|
||||||
Proxy::new(self.sender.clone())
|
Proxy::new(self.sender.clone())
|
||||||
|
|
Loading…
Add table
Reference in a new issue