Skip to content

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

Closed

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

Activity

  1. added
    t/bug
    on Jun 11, 2025
  2. added
    partner/syncfusion
    on Jun 11, 2025
  3. praveenkumarkarunanithi commented on Jun 11, 2025

    @praveenkumarkarunanithi
    Contributor

    This issue has been verified in Visual Studio Code 1.100.3 with .NET MAUI version 9.0.71. It is reproducible on the Android, iOS and Windows platforms.

  4. added
    s/verified
    s/triaged
    partner/macios
    partner/android
    on Jun 11, 2025
  5. ghost removed
    partner/macios
    on Jun 20, 2025
  6. ghost removed
    partner/android
    on Jun 20, 2025
  7. ghost added
    platform/macos
    on Jun 20, 2025
  8. added this to the .NET 9 SR10 milestone on Jun 26, 2025
  9. locked and limited conversation to collaborators on Jul 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    partner/syncfusionplatform/androidplatform/iosplatform/macosplatform/windowss/triageds/verifiedt/bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions