From d5a15419e98cf31c173fff5a10f97e36958d994f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Thu, 5 Nov 2020 04:11:49 +0100 Subject: [PATCH] Drop `UserInterface` manually after exit request --- glutin/src/application.rs | 3 +++ winit/src/application.rs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/glutin/src/application.rs b/glutin/src/application.rs index b8e80ddf..0f748ecb 100644 --- a/glutin/src/application.rs +++ b/glutin/src/application.rs @@ -300,6 +300,9 @@ async fn run_instance( _ => {} } } + + // Manually drop the user interface + drop(ManuallyDrop::into_inner(user_interface)); } fn build_user_interface<'a, A: Application>( diff --git a/winit/src/application.rs b/winit/src/application.rs index 07108249..3a41a0e4 100644 --- a/winit/src/application.rs +++ b/winit/src/application.rs @@ -383,6 +383,9 @@ async fn run_instance( _ => {} } } + + // Manually drop the user interface + drop(ManuallyDrop::into_inner(user_interface)); } /// Returns true if the provided event should cause the [`Application`] to