Jimmy Bouker
Jimmy Bouker

Reputation: 118

Get Notified of Low Memory Crashes

I am trying to find a way to capture low memory crashes. Most crash reporting tools, for example Crashlytics, do not capture low memory os kills.

https://twitter.com/crashlytics/status/235018252647010304 http://support.crashlytics.com/knowledgebase/articles/123408-do-you-catch-out-of-memory-crashes

Does anyone know of any crash reporting tools that catch low memory crashes? Or, does anyone know of a way to detect these crashes w/out any added reporting tools?

Thanks!

Upvotes: 2

Views: 1736

Answers (1)

Aaron Brager
Aaron Brager

Reputation: 66282

You can't "catch" a low memory warning, but you can be notified in advance of them happening. You can implement applicationDidReceiveMemoryWarning: in your app delegate or respond to the UIApplicationDidReceiveMemoryWarningNotification. Aside from that, your app isn't notified when it's terminated.

You can also store transient data in NSCache, and it'll disappear under memory pressure.

Upvotes: 2

Related Questions