How to Solve This Error: Thread 1: Exc_Resource Resource_Type_Memory (Limit=650 Mb, Unused=0X0)

How should I solve this error: Thread 1: EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=650 MB, unused=0x0)?

It seems like your app uses to much resources.

First of all, check if your assets have big file sizes, and if that is the case resize them to a lower resolution.

Also loading all of these (mostly hidden below the visible area) views into the scroll view at once is very memory inefficient. Try using a table view or collection view that only loads these views when visible. This could also help you get rid of code duplication

ios app maximum memory budget

I think you've answered your own question: try not to go beyond the 70 Mb limit, however it really depends on many things: what iOS version you're using (not SDK), how many applications running in background, what exact memory you're using etc.

Just avoid the instant memory splashes (e.g. you're using 40 Mb of RAM, and then allocating 80 Mb's more for some short computation). In this case iOS would kill your application immediately.

You should also consider lazy loading of assets (load them only when you really need and not beforehand).



Related Topics



Leave a reply



Submit