Why is Page not disposed?

I am new to using a profiler. Can someone help me understand this path to root and explain why my XPressDataEntryPage is not being disposed? I navigated to the XPressDataEntryPage and then clicked back and then took a snapshot which I think runs the GC. I see MessagingCenter, but I do NOT use MessagingCenter for this XpressDataEntryPage. I see my DarkNavigationPage, but I clicked back so it should not be in the navigation stack anymore. I see toolbaritem and command, but I remove the command binding when the XPressDataEntryPage gets popped.

Best Answer

  • ShawnCastrianni.5092ShawnCastrianni.5092 US ✭✭✭
    Accepted Answer

    It looks like the answer is that since I had just clicked Back, the NavigationPage created a Task for the animation to go back which stores a reference to the page being dismissed. That Task stays inside the NavigationPage until it needs to animate the next page. So if I click back a second time, XPressDataEntryPage goes away.

Answers

  • ShawnCastrianni.5092ShawnCastrianni.5092 US ✭✭✭
    Accepted Answer

    It looks like the answer is that since I had just clicked Back, the NavigationPage created a Task for the animation to go back which stores a reference to the page being dismissed. That Task stays inside the NavigationPage until it needs to animate the next page. So if I click back a second time, XPressDataEntryPage goes away.

Sign In or Register to comment.