-
Notifications
You must be signed in to change notification settings - Fork 24.1k
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 in hybrid app #11628
Comments
i'm having the same issue, any updates on this? |
@mkonicek @javache @satya164 Have attached screenshot for the memory leak checked on getting heap dump for same issue. Can someone please suggest a way to get rid of this strong reference!! |
Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally! If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:
If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution. |
@Trikke @konark-hike So sorry I missed the cc on this a long time ago! We were overloaded with GitHub issues. Some of them were questions, some potentially more serious like this one and we struggled to go through all issues and reply to all of them. I found something that might be related: AirBnb, Instagram (blog post) and other hybrid apps use React Native on Android so I think if this was a real issue that happens in production it would have been fixed by now. However, I just saw reports from LeakCanary when working on my hybrid app just now. I will update here if I find out more. |
Hi @dbof10, @Trikke, @konark-hike, I added a JS screen to my native app, have been reloading JS, navigating away from that screen and back to it many times and memory usage stays flat, as shown by Android Studio: I'm using LeakCanary in the app which occasionally shows "Dumping memory, app will freeze. Brr!" and writes a heap dump to disk. After a while I get a notification saying "Leak analysis failed" and the reason it failed is an OOM in the heap analyzer: square/leakcanary#484 I can't see your original gists anymore but from the memory usage graph above my app looks fine. Here is my Activity (in Kotlin):
I'm using all the standard handling from the
And in my
And finally the host is quite simple:
|
I'm currently using React Native for our new homepage. After having added LeakCanary, I got a log below
https://gist.github.com/dbof10/8d961f7c16bf6056867c2d3940c77011#file-leakstacktrace.
My Activity is
https://gist.github.com/dbof10/8d961f7c16bf6056867c2d3940c77011#file-mainactivity-java
The text was updated successfully, but these errors were encountered: