The most important thing you need to know to manage memory in this case is to use high or low resolution textures. The easiest way I use is to check this
CGFloat scale = [[UIScreen mainScreen] scale]; if ((scale > 1.0) || (self.view.frame.size.width > 320)) { highRes = TRUE; }
This works for all devices so far and should be promising evidence, new devices will use high res. You can also calculate a directly proportional aspect ratio (ipad vs iphone will help later)
aspect = self.view.frame.size.width/self.view.frame.size.width
Donβt download highres in the first place, it kills the load time of your applications, in my 3G download most of my downloads load (even low resolution) textures, just check it right at the beginning and donβt touch the highres materials.
On older devices, the program will die without warning due to the large textures, it may have something to do with a debugger that is not able to capture video memory consumption and die.
For greater optimizations, consider tinting your mipmaps to check the lowest texture size that is actually used (only if you use 3D objects).
Forget about the problem with video memory size, the memory is actually shared, so you are competing for system memory, and on older devices you have an MB limit for use, but it is still system memory.
About memory management, there are many ways to do this: the simplest one should be marked with downloadable textures and textures, which are necessary when a memory warning appears, to unload downloadable but not needed textures ...
led42 Nov 09 2018-11-11T00: 00Z
source share