Skip to content

Removing page from navigation stack that is not the currently displayed page does not disconnect its handler #29923

Open
@Vetle444

Description

@Vetle444

Description

Maybe this is the expected outcome, however, I believe it makes more sense that the framework disconnects the page's handler even though it is not currently displayed, to avoid memory leaks and consistency.

Only tested on iOS and Android.

Image

Steps to Reproduce

  1. Clone https://github.com/Vetle444/MauiTestApp/tree/removePageHandler/MauiTestApp
  2. Run app
  3. Click either "Test Page Modal" or "Test Page" button
  4. Navigate to next page
  5. Click "Remove test page 1"
  6. Observe that no dialog appears saying that the Handler of Test Page 1 is disconnected.
  7. If you do a normal back navigation from Test Page 1, the handler is disconnected, as expected.

Link to public reproduction project repository

https://github.com/Vetle444/MauiTestApp/tree/removePageHandler/MauiTestApp

Version with bug

9.0.70 SR7

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

No response

Affected platforms

iOS, Android, I was not able test on other platforms

Affected platform versions

No response

Did you find any workaround?

Disconnect handler manually

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions