Navigation.PushAsync Memory Leak

topbktopbk AUMember ✭✭

Hello everyone,

This is the first time I'm writing to this forum. Hope someone can help me.

I'm building Xamarin cross-platform app. In there I'm using Navigation.PushAsync to go to InvoiceItem page while I'm in InvoieHeader page. Again from InvoiceItem page button click event, I use Navigation.PushAsync to go to InvoiceHeader page. This will happen several times. The issue is when this happens memory is increasing and did not release. Sometime later app will crash.
Hope someone can help me


  • MarlonRibeiroMarlonRibeiro USMember ✭✭✭

    Well, if you want to go back from InvoieItem page to InvoieHeader page, why not use Navigation.PopAsync() instead of pushing infinitely?
    When you pop the page, it releases the memory.

  • topbktopbk AUMember ✭✭

    Thanks for your reply,
    From InvoiceItem page to InvoiceHeader I want to pass back the model. PopAsync couldn't send back the model. Do you have any example code which can do this?

Sign In or Register to comment.