Hi Wenzil
yes… Corona will try to load all of the textures into the memory again.
If you have a lot of them… it will take some time to do it.
The worst thing is that you can’t display anything to the user to let them know what is going on, because during applicationSuspend phase you don’t have enough time to do it [images etc. are not shown to the user because this requires the next frame to be displayed on screen, and it is impossible to do it during suspend].
For my app it would take up to 20-30 seconds on older devices to resume…
My solution to this problem was to release the largest imagesheets during suspend, and load them back during resume.
It took me a lot of time to handle it, because the largest imagesheets were animations of enemies, and I can have a lot of them on screen, and a lot of the game logic depends on the animation itself [phases etc etc, nevermind].
Anyway in the end I was able to release all of the enemy animations, so my game resumes in a second or two on older devices and then shows a loader which will load the removed imagesheets.
Of course you have to take into account the fact, that when you are resuming, and loading your imagesheets, user can suspend the app again… and again…
A lot of effort went into this problem on my side, a lot of time “wasted” on handling this. The effect is not ideal, but I think it’s the best I can get when using Corona.
Tip: when loading large portions of graphics at once, don’t forget to add a timer with at least 50ms between load of every imagesheet. On older [or not even older but low-end] devices you will experience out of memory errors when you try to load them all at once. You have to give the garbage collector a chance to prepare some memory for you.
phew… that’s it I think.
If you find any better way to tackle this, please share.