Memory Management

Hello, I am trying to manage my game’s memory and I literally can’t understand why am I getting low memory warnings, I am testing on a iPad mini 2 which has 1GB of ram and I getting low memory warnings and the app dies when I have 400mb used!

What’s going on and why is this happening? I am downloading bundles but I am careful with them and also I have set stripping level to bytecode. I’m attaching an image from the instruments at the moment of the crash

Even if the device has 1GB mem it does not mean you allowed to use it all or even half of it. There are usually other apps running or freezed too and 400mb sounds high for what Apple usually lets you have (which is based on multiple things).

Can you expand a bit on that’s I want to know more :slight_smile:

Well there is no fixed amount of memory you can use but usually its safe to use at least 200-300mb on newest devices and below 200 on older. It can be more but if you start to get memory warnings then you must react on them nearly instantly. Apple does not tell any memory limits and the logic for usable memory is complex as it depends of the device type, iOS version, max mem, running apps etc.

You can Google around like “ios max available memory” or etc and see the stuff that fits your environment. If you want to support multiple devices then you need to optimize a lot and use as only memory you need and sometimes sacrifice quality.

Right, yeah I know all that just looking for different opinions/experiences :slight_smile:

yeah I follow the less than 200mb since ipad2 is still on sell near the ipad min/4/air in the Apple store…