Skip to content

Commit 2556405

Browse files
authored
Fixes #15389, added docs to RawHandleWrapper::_window field (#18832)
# Objective - Fixes #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. ---
1 parent 7f9eae2 commit 2556405

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/bevy_window/src/raw_handle.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ impl<W: 'static> Deref for WindowWrapper<W> {
5050
/// thread-safe.
5151
#[derive(Debug, Clone, Component)]
5252
pub struct RawHandleWrapper {
53+
/// A shared reference to the window.
54+
/// This allows us to extend the lifetime of the window,
55+
/// so it doesn’t get eagerly dropped while a pipelined
56+
/// renderer still has frames in flight that need to draw to it.
5357
_window: Arc<dyn Any + Send + Sync>,
5458
/// Raw handle to a window.
5559
window_handle: RawWindowHandle,

0 commit comments

Comments
 (0)