-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Many Controls end up preventing Garbage Collection #19606
Comments
Hi @michaelstonis. 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. |
You listed an example but didn't link it. Could you link it please? |
Also, my guess is that this is a duplicate of #18365, which covers the same topic. |
@drasticactions sorry about that. Link updated and provided here https://github.com/michaelstonis/MauiCleanTest. I think that this is the same/similar as #18365 I had not found that one when searching before posting this though. The only difference, if anything, is that I am seeing it on iOS, Mac Catalyst, and Android. |
Hi @michaelstonis. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version. You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository. 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. |
Description
We have noticed across multiple applications that memory pressure consistently increases until crashing. It appears that this is, in part, related to certain controls not allowing a page to be garbage collected which then has rippling effects (view models, data models, etc.) that prevent any additional objects on that page to be collected.
I've tested this against Android and iOS and the controls that consistently seem to not allow GC are the following:
2023-12-27_20-39-20.mp4
Video shows examples of creating controls adding them as the only control on a page, navigating from the page and invoking the GC.
Steps to Reproduce
GCed page with {Name of View}
Link to public reproduction project repository
Reproduction Repository
Version with bug
8.0.3
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android, I was not able test on other platforms
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: