| 93 | } |
| 94 | |
| 95 | ~XamlThread() |
| 96 | { |
| 97 | if (m_Manager) |
| 98 | { |
| 99 | m_Manager.Close(); |
| 100 | m_Manager = nullptr; |
| 101 | } |
| 102 | |
| 103 | // let the XAML framework cleanup |
| 104 | MSG msg{}; |
| 105 | while (PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE)) |
| 106 | { |
| 107 | TranslateMessage(&msg); |
| 108 | DispatchMessage(&msg); |
| 109 | } |
| 110 | } |
| 111 | }; |