maui
maui copied to clipboard
[iOS] Navigation.PushModalAsync memory leak
On iOS MAUI app there is a memory leak when pushing a modal page, when this modal page is popped, the underlying navigation page loses all controls.
Steps to Reproduce
- Create Maui app with two pages
- Call PushModalAsync(second page)
- Call PopModalAsync()
- Run iOS simulator or on device
Actual Behaviour:
Page that called a modal page becomes completely blank after pop
Expected Behaviour:
Modal page pushed and popped without a memory leak
I have a sample project with Memory toolkit applied where you can see a page gets leaked after pushing modal page and becomes blank after popping it https://github.com/nastutusha/MauiModalMemoryLeak
Version with bug
I can reproduce it with .NET 8.0.402 and 9.0.100-rc.2.24474.11
Affected platforms
iOS