App crashes when downloading several images


Hi thunkers !

In my app I’m getting several images from an api to several image components … The problem is that the app crashes … I start to get the images by using got file component and when that file is got I begin to download the other and so on (I’m doing this as a loop in the got file component itself )
Till it reaches say 20 images or 22 or 10 images and the app crashes


see tip 2 here



I’m using only one arrangement in one screen only


that doesn’t matter, you are displaying several large images at the same time, which most probably results in an out of memory error and in crashing the app after a while

search the forum a little bit and you find loads of threads about out of memory issues… for example



Isn’t there any way to know the memory limits so that I don’t load more images?
I mean to know the sum of sizes of all images and then compare them with the memory of the device to avoid out of memory problem .