This PR updates the Windows winuser Drop implementation to use winuser::DestroyWindow(...) instead of winuser::CloseWindow(...). According to the docs, CloseWindow() "Minimizes (but does not destroy) the specified window.". This should allow the Window to be properly destroyed once it falls out of scope.
I have also added a small example cargo run --example drop that tests the behavior. Feel free to remove this if not needed. Have left it there in case it was helpful to quickly test this behavior across other OS.
This PR updates the Windows winuser
Drop
implementation to usewinuser::DestroyWindow(...)
instead ofwinuser::CloseWindow(...)
. According to the docs,CloseWindow()
"Minimizes (but does not destroy) the specified window.". This should allow the Window to be properly destroyed once it falls out of scope.I have also added a small example
cargo run --example drop
that tests the behavior. Feel free to remove this if not needed. Have left it there in case it was helpful to quickly test this behavior across other OS.