Hi Salva,
Thanks for your patience.
We have analysis the sample and We checked the memory leak by using the Performance profiler and we found there are only few objects which are related to SfPopupLayout are hold when come back to the normal page. we have load the CustomLabel inside the ContentTemplate. Check the object the custom label object, there no object related to CustomLabel.
Disposing PopupView and its related objects:
Each time when you close the popup using SfPopupLayout.IsOpen = false or SfPopupLayout.Dismiss(), we will automatically dispose all the native platform objects that we had created for showing the popup view. So you can be guaranteed that the popup view related objects are cleared each time you close the popup. In your case, you have opened and closed the popup view continuously, So that the Dignositc tool will show the high memory usage.
However, if the dispose implementation of the control loaded inside the popup view is faulty, or you want to dispose the unnecessary views when the popup is closed, that has to be dealt from the sample level in the SfPopupLayout.Closed event.
Disposing SfPopupLayout and its related objects:
The dispose for the SfPopupLayout instance and its contents will be triggered automatically once you exit the page that contains the SfPopupLayout. Else you can also call the SfPopupLayout.Dispose() wherever required. Any template view that you have loaded inside the SfPopupLayout needs to be disposed manually in the OnDisappearing() override of the page.
Please refer the below link to know more about the Performance profiling:
We have logged the bug report for few SfPopup object are hold. We will fix and include it in our upcoming volume 3 main release. which is expected to be rolled out at the end of September 2020.
You can also track the status of the report in below feedback link,
Regards,
Sivaraman S