diff --git a/src/platform_impl/windows/event_loop.rs b/src/platform_impl/windows/event_loop.rs index 4fc31553ff..35e3410d15 100644 --- a/src/platform_impl/windows/event_loop.rs +++ b/src/platform_impl/windows/event_loop.rs @@ -2441,7 +2441,7 @@ unsafe extern "system" fn thread_event_target_callback( if userdata_removed { drop(userdata); } else { - Box::into_raw(userdata); + Box::leak(userdata); } result }