maui icon indicating copy to clipboard operation
maui copied to clipboard

[iOS] Navigation.PushModalAsync memory leak

Open nastutusha opened this issue 4 months ago • 2 comments

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

  1. Create Maui app with two pages
  2. Call PushModalAsync(second page)
  3. Call PopModalAsync()
  4. 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

nastutusha avatar Oct 21 '24 10:10 nastutusha