dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.99k stars 1.72k forks source link

Memory raising when using Application.Current.MainPage.Navigation.PushAsync #21007

Open danies8 opened 6 months ago

danies8 commented 6 months ago

Description

Hi,

I used only Application.Current.MainPage.Navigation.PushAsync(new page) only in my app for navigationg but the memory is raising after each navigation. I tested with published as exe (from Visual studio 17.8.4). Please see https://app.screencast.com/cFXT6QgHXsVja Thanks

Steps to Reproduce

I used only Application.Current.MainPage.Navigation.PushAsync(new page) only in my app for navigationg but the memory is raising after each navigation. I tested with published as exe (from Visual studio 17.8.4). Please see https://app.screencast.com/cFXT6QgHXsVja

Link to public reproduction project repository

....

Version with bug

8.0.3 GA

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

.....

Did you find any workaround?

No

Relevant log output

No
ghost commented 6 months ago

Hi @danies8. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

danies8 commented 6 months ago

FlyoutExample.zip Can you please see if the navigation is ok now ? do not cause memory leak.

danies8 commented 6 months ago

Any answer? FlyoutExample.zip

danies8 commented 6 months ago

Can you please answer?

Zhanglirong-Winnie commented 6 months ago

Verified this issue with Visual Studio 17.10.0 Preview 2. Can repro on Windows platform with sample project.

thanigaiharan commented 3 months ago

@Eilon @PureWeen Do we have any update on this? The Memory is keeps cascading even after the Navigation.PopAsyc(). Implemented DisconnectHandler() but still the memory is cascading.