I was wondering if all the resources (images, audios, videos) of an App are copied to memory when an iOS App launches, because if it is so then it wouldn't be necessary loading all the resources at startup to avoid any lags later.
Are all the resources of an App Bundle copied to memory (RAM) when an iOS App Launches?
110 views Asked by enigma At
2
There are 2 answers
0
On
Most iOS devices only have 1GB RAM (the newest iPad has upgraded to 2GB) so loading all resources when an app loads wouldn't be physically possible. Even if there was enough memory the practice would slow down launch times considerably. All iOS devices also use fast Flash memory so there's no reason to push everything into RAM.
Load resources, both from the bundle and the Internet, on another thread in the background when they're likely to be needed soon.
No, they aren't, doing so would crash a lot of apps as the total set of resources will be too large to load all at the same time.
As a rule you should load only what you need and when you need it, or as close in advance to when you need it as you can.