diff --git a/crates/bevy_window/src/raw_handle.rs b/crates/bevy_window/src/raw_handle.rs index 545c220931..0943315055 100644 --- a/crates/bevy_window/src/raw_handle.rs +++ b/crates/bevy_window/src/raw_handle.rs @@ -50,6 +50,10 @@ impl Deref for WindowWrapper { /// thread-safe. #[derive(Debug, Clone, Component)] pub struct RawHandleWrapper { + /// A shared reference to the window. + /// This allows us to extend the lifetime of the window, + /// so it doesn’t get eagerly dropped while a pipelined + /// renderer still has frames in flight that need to draw to it. _window: Arc, /// Raw handle to a window. window_handle: RawWindowHandle,