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

[Android] :: running foreground cause screen fragment memory leak #2179

Open
chanphiromsok opened this issue Jun 11, 2024 · 0 comments
Open
Labels
Platform: Android This issue is specific to Android Repro provided A reproduction with a snack or repo is provided

Comments

@chanphiromsok
Copy link

chanphiromsok commented Jun 11, 2024

Description

I have an issue with the app memory leak, I have read the old issue #843 (comment)

  • my app is running foreground service so when I repeat it about 30 times close -> open -> it causes a memory leak does the react native screen have an option to destroy the screen?
  • I keep the Android process running but when I close (swipe the app out normally in Android swipe the app out it would be killed) and open the app it increases the app memory do we have the option to destroy it?
  • is there any better solution for this case ?

Screenshot 2024-06-11 at 09 26 25

Steps to reproduce

  • running foreground service and keeping the app processes alive
  • open -> close -> repeat 10times
Untitled.mp4

Snack or a link to a repository

https://github.com/chanphiromsok/rnn-screen-leak

Screens version

3.30.1

React Native version

0.74.2 and 0.73

Platforms

Android

JavaScript runtime

Hermes Engine

Workflow

Expo managed workflow

Architecture

Paper (Old Architecture)

Build type

Release mode

Device

Real device

Device model

Samsung Galaxy S10 + any Android devices

Acknowledgements

Yes

@github-actions github-actions bot added Repro provided A reproduction with a snack or repo is provided Platform: Android This issue is specific to Android labels Jun 11, 2024
@chanphiromsok chanphiromsok changed the title foreground service close and open cause screen fragment memory leak [Android] :: running foreground cause screen fragment memory leak Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Android This issue is specific to Android Repro provided A reproduction with a snack or repo is provided
Projects
None yet
Development

No branches or pull requests

1 participant