Closed jonathanpeppers closed 16 hours ago
Fixes: https://github.com/dotnet/maui/issues/20094 Context: https://github.com/AdamEssenmacher/iOSModalLeak.Maui
In the above sample, you can see that modal Page's on iOS or Catalyst live forever after they are dismissed. I was able to reproduce this issue in a device test.
Page
After some investigation, the ContainerViewController appears to have a cycle:
ContainerViewController
IElement? _view;
PageHandler
After 7d0af63c was merged, this works fine when using NavigationPage, but not when using modals.
NavigationPage
It appears after solving the cycle, the ContainerViewController goes away as well as the PageHandler and the Page.
Fixes: https://github.com/dotnet/maui/issues/20094 Context: https://github.com/AdamEssenmacher/iOSModalLeak.Maui
In the above sample, you can see that modal
Page
's on iOS or Catalyst live forever after they are dismissed. I was able to reproduce this issue in a device test.After some investigation, the
ContainerViewController
appears to have a cycle:ContainerViewController
->IElement? _view;
->PageHandler
->ContainerViewController
After 7d0af63c was merged, this works fine when using
NavigationPage
, but not when using modals.It appears after solving the cycle, the
ContainerViewController
goes away as well as thePageHandler
and thePage
.