Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up WinitWindows::remove_window (#12749)
# Objective - Avoid unbounded HashMap growth for opening/closing windows. ## Solution - Remove map entry in `WinitWindows::remove_window`. ## Migration Guide - `WinitWindows::get_window_entity` now returns `None` after a window is closed, instead of a dead entity. --- ## Comments The comment this PR replaces was added in #3575. Since `get_window_entity` now returns an `Entity` instead of a `WindowId`, this no longer seems useful. Note that `get_window_entity` is only used [here](https://github.com/bevyengine/bevy/blob/56bcbb097552b45e3ff48c48947ed8ee4e2c24b1/crates/bevy_winit/src/lib.rs#L436), immediately followed by a warning if the entity returned doesn't exist.
- Loading branch information