diff --git a/CHANGELOG.md b/CHANGELOG.md index 633b0269..28ecbf83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Unreleased +- On macOS, drop the event callback before exiting. - On Android, implement `Window::request_redraw` - **Breaking:** On Web, remove the `stdweb` backend. - Added `Window::focus_window`to bring the window to the front and set input focus. diff --git a/src/platform_impl/macos/event_loop.rs b/src/platform_impl/macos/event_loop.rs index 45a32306..7c5ceaeb 100644 --- a/src/platform_impl/macos/event_loop.rs +++ b/src/platform_impl/macos/event_loop.rs @@ -174,10 +174,12 @@ impl EventLoop { let () = msg_send![app, run]; if let Some(panic) = self.panic_info.take() { + drop(self._callback.take()); resume_unwind(panic); } AppState::exit(); }); + drop(self._callback.take()); } pub fn create_proxy(&self) -> Proxy {