Yes, it seems so
Yes
react-native -v: node -v: v8.4.0npm -v: v5.3.0yarn --version: v1.0.0(Write your steps here:)
Image are well garbaged while scrolling FlatList (recycle view + fresco disk caching ?)
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 :

I encountered the same problem, any solution for this problem ?
Just a little up to not forget :/
Any updates?
👍 +1
Any solution for this ?
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.
<FlatList
data={this.state.dataSet}
keyExtractor={this._keyExtractor}
renderItem={this._renderItem}
removeClippedSubviews />
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 removeClippedSubviews, it does not defualt to true for FlatList or SectionList, only for ListView
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 removeClippedSubviews by also implementing FLAnimatedImage. Here's what ended up doing the trick, in total:
removeClippedSubviewsinitialNumToRender to some appropriate value that covers the contents of the initial viewextraData as recommended in the React Native Docs (0.54)FLAnimatedImages instead. 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!
Most helpful comment
use
removeClippedSubviews, it does not defualt totruefor FlatList or SectionList, only for ListView