Skip to content
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

Memory leak when Xamarin.AndroidX.ConstraintLayout package is installed in source #970

Open
JayaramSurya-TomTom opened this issue Sep 23, 2024 · 0 comments

Comments

@JayaramSurya-TomTom
Copy link

Android application type

Android for .NET (net6.0-android, etc.)

Affected platform version

VS 17.11.2 dotnet 7.0 and dotnet 8.0

Description

Upon installing Xamarin.AndroidX.ConstraintLayout in the application's source code, a memory leak related to ReportFragment from the androidx.lifecycle library is observed when navigating to a new activity and subsequently returning to the previous activity. This issue was replicated in a new .NET Android solution where only Xamarin.AndroidX.ConstraintLayout was installed. The memory leak was detected using the Android Studio profiler after navigating back to the previous activity. An attachment has been provided for reference.
memory leak

Steps to Reproduce

  1. Begin by creating a new .NET Android project.
  2. Within the main activity page, add a button to facilitate the creation of a new activity.
  3. Implement functionality to navigate to the new activity upon clicking the button.
  4. Enable navigation back to the previous page by pressing the back button.
  5. Repeat this process multiple times.
  6. Capture a heap dump using the Android Studio profiler to identify any memory leaks.
  7. After iterating the process x times, you should be able to identify x instances of memory leaks.

Did you find any workaround?

No response

Relevant log output

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant