On Windows, Application::Quit() ends in PostQuitMessage() (src/platform/windows/application_windows.cpp) without destroying the application's windows first.
window_manager had the same pattern in destroy(), and there it made apps take several seconds to exit, or stop responding, since Flutter 3.24. The window and the Flutter engine were torn down after the message loop had already stopped.
Expected: destroy the windows (so the Flutter view controller shuts down its engine while messages are still pumped), then post WM_QUIT. Needs checking in a Flutter app, including with a close handler that intercepts the system close button.
Background:
On Windows,
Application::Quit()ends inPostQuitMessage()(src/platform/windows/application_windows.cpp) without destroying the application's windows first.window_manager had the same pattern in
destroy(), and there it made apps take several seconds to exit, or stop responding, since Flutter 3.24. The window and the Flutter engine were torn down after the message loop had already stopped.Expected: destroy the windows (so the Flutter view controller shuts down its engine while messages are still pumped), then post
WM_QUIT. Needs checking in a Flutter app, including with a close handler that intercepts the system close button.Background: