Good day currently my app crashes on an ios device whenever i try to load hundreds of items at the same time with for loop. Apparently this happens because of memory load, it makes my ios device crash because of overloading, meanwhile here in simulator it doesn’t crashes.
Currently my workaround is first I load 20 items 1st, then when everytime the bottom has been reached, I load 10 more, until it reaches its limit.
but with my style, there is a certain point where the app crashes. are there any good ideas on how to load multiple images all at the same time.
here is my code:
local displayImages = function(lVal) if lVal \> 1 then else if #storeData \>= 20 then dulo = 20 else dulo = #storeData end end if dulo \<= 0 then else for i = lVal, dulo do d = d + 1 imagesText[i] = display.newImageRect( storeData[i].imageBig..".png", system.DocumentsDirectory, 744, 500) imagesText[i].x = X imagesText[i].y = Y imagesText[i].anchorX = 0 imagesText[i].anchorY = 0--Futura-Medium end
Note: there are also other objects that are loaded along with images I just posted the idea on how it will work.
thanks in advance