Search code examples
uwpwindows-runtimewinui-3c++-winrt

Application.Exit and cyclic references


Application.Exit wont close the process. The UI remains interactive.

Is this because I have cyclic references?

How do I find cyclic references without reasoning about the code?


Solution

  • Cyclic references don't affect Application.Exit.

    It turns out I was hitting the rough edges of the api by hacking Xaml::Controls::Grid with a combination reusing named xaml components with components created from code behind:

    • Grid.ColumnDefinitions.Append
    • Grid.Children.Append
    • Grid.SetColumnSpan

    I broke the first rule of programming: avoid the rough edges