From 2556405feb4da55c9bdd9249ee181bd888a9e2e0 Mon Sep 17 00:00:00 2001 From: mhsalem36 <146405510+mhsalem36@users.noreply.github.com> Date: Mon, 28 Apr 2025 14:44:57 -0700 Subject: [PATCH] Fixes #15389, added docs to RawHandleWrapper::_window field (#18832) # Objective - Fixes https://github.com/bevyengine/bevy/issues/15389. - Add documentation for RawHandleWrapper::_window field since It's needed to drop the window at the correct time. ## Solution - Added documentation to RawHandleWrapper::_window field as same as WindowWrapper documentation. ## Testing - No testing needed since it is documentation. --- --- crates/bevy_window/src/raw_handle.rs | 4 ++++ 1 file changed, 4 insertions(+) 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,