-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Potential leak on FlatList + images #15930
Comments
I encountered the same problem, any solution for this problem ? |
Just a little up to not forget :/ |
Any updates? |
👍 +1 |
Any solution for this ? |
1 similar comment
Any solution for this ? |
I'm seeing this too 🙁 |
Its been two months, did you had any feedback on this? |
Isn't it related to this. I haven't ran your code, but mine had similar issue and stoping remote debugging worked. |
We have this bug in production, the repo is simply a reproduction in dev mode, but it exists for us in production. No feedbacks for now :/ |
Last month I had the same problem/bug with the app in production. I found a momentary solution (workaround?) when I added the property 'removeClippedSubviews' in FlatList.
In my case, it worked well and decreased memory leaks. |
@RafaelMagalhaesN tried, but no help |
Any solutions for this yet? Can anybody explain why it's happening despite using flatlist? Does flatlist not automatically garbage collect or free the memory of the images not in the view? |
according to the docs removeClippedSubviews is by default true for FlatList |
Okay |
use |
Thanks for posting this! It looks like you may not be using the latest version of React Native, v0.53.0, released on January 2018. Can you make sure this issue can still be reproduced in the latest version? I am going to close this, but please feel free to open a new issue if you are able to confirm that this is still a problem in v0.53.0 or newer. |
(FYI, refer to #13413 for followup on this) |
this is still active on .54, adding an Image to Flatlist cause huge memory leak on android. |
I had been running to this with my application, which is a Flatlist that contains between 10 - 20 GIFs at a time. I was able to solve the crashing and subsequent choppiness that I got from using
1 - 4 all had performance benefits, and helped drastically reduce the total memory load, and #5 took it over the edge with extra memory reduction and (mostly) substantially smoother scrolling. I haven't verified yet which of these changes are doing the heavy lifting, but all of them taken together definitely made the difference. Also, don't forget to turn off the remote debugger when working with a real device. hope this helps someone else! |
Is this a bug report?
Yes, it seems so
Have you read the Contributing Guidelines?
Yes
Environment
react-native -v
:node -v
: v8.4.0npm -v
: v5.3.0yarn --version
: v1.0.0Steps to Reproduce
(Write your steps here:)
Expected Behavior
Image are well garbaged while scrolling FlatList (recycle view + fresco disk caching ?)
Actual Behavior
It 'actually throws OOM errors :
Here's the Android monitoring shot while I m playing with the app. We can see that the memory is always jumping but rarely dropping, and so forth, OOM at some moment
And here's what I can see from the Eclipse Memory Analyzer stuff :
Reproducible Demo
The text was updated successfully, but these errors were encountered: