iOS, check if the app crashes because of lack of memory

2.7k Views Asked by At

How can I make sure that reason of crashes is lack of memory?
Is there anything specific in crash log? Maybe I have to use some tools or libraries?

UPDATE: my app uses lot of memory and receives memory warnings. It's very difficult to reduce memory usage. It crashes because of memory warnings time to time. But I want to make sure that it doesn't crash because of other reasons.
So how can I check the reason of app crash (it receives lots of memory warnings every time)

UPDATE2: Application has lots of 3D graphics and complex UI that takes lots of memory for textures. Customer doesn't want to make any kind of "loading..." pauses. If I unload invisible textures in background I can't get smooth animations.

So I just need to detect is there any crash reasons except memory.

4

There are 4 best solutions below

2
On

You can use Apple's Instruments Tool to profile various things such as memory usage. This tool is bundled together with Xcode.

1
On

At least you could implement the method

- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application

in your app delegate, and put a log to see if this indeed you are going through it before crashing.

1
On

Product -> Profile -> leak is a possible method to check memory leak. Allocations will show the total memory being used, and leaks will show leaks due to not releasing.

0
On