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

[Bug]: Compose-related memory leaks #1446

Open
3 tasks done
brian-livefront opened this issue May 16, 2024 · 0 comments
Open
3 tasks done

[Bug]: Compose-related memory leaks #1446

brian-livefront opened this issue May 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@brian-livefront
Copy link

brian-livefront commented May 16, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Is there a StackOverflow question about this issue?

  • I have searched StackOverflow

What happened?

The SearchViewModel (and likely other ViewModels) appears to leak after navigating to the search screen and back to the main screen. This seems to be related to this Compose issue.

Steps to reproduce

  • Open the app.
  • Navigate to the search screen.
  • Enter text in the search field.
  • Exit the search screen.
  • Open the memory profiler, attempt to force a garbage collection several times, and then collect a heap dump.
  • Search for SearchViewModel in the heap.

The SearchViewModel will still be present in the heap even though the screen was left and many garbage collections were attempted.

Screenshot 2024-05-16 at 12 50 46 PM

Relevant logcat output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@brian-livefront brian-livefront added the bug Something isn't working label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant