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

Enhance memory consumption with "collectAsStateWithLifecycle" #50

Closed
Skyyo opened this issue Aug 26, 2022 · 0 comments · Fixed by #59
Closed

Enhance memory consumption with "collectAsStateWithLifecycle" #50

Skyyo opened this issue Aug 26, 2022 · 0 comments · Fixed by #59
Assignees

Comments

@Skyyo
Copy link
Owner

Skyyo commented Aug 26, 2022

When UI isn’t visible and collectAsStateWithLifecycle instead of collectAsState - flows on the UI layer will stop being collected, thus - freeing up resources. Dependency below is needed to access this new API:
implementation "androidx.lifecycle:lifecycle-runtime-compose:2.6.0-alpha01"

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

Successfully merging a pull request may close this issue.

2 participants