user1460951
user1460951

Reputation: 45

Message in didReceiveMemoryWarning in iPhone app

Is it advisable or even allowed to add a message to prompt user to restart the app before the app receive memory warning? Why yes and why no?

Upvotes: 1

Views: 155

Answers (1)

SomaMan
SomaMan

Reputation: 4164

Not sure why the question was voted down - seems like a perfectly reasonable thing to ask.

As far as I'm aware, Apple are not keen on the idea of users thinking of exiting apps (or in fact thinking about any of the background stuff which developers need to be aware of) - it's just supposed to happen. You'll get a memory warning when you start running out of memory, and you've got the chance to do something about it, so that the user is blissfully unaware of any potential problems. Look for other posts about what to do using viewDidUnload, which can get called in low memory situations (as well as didReceiveMemoryWarning).

When you're new to iPhone developing, it can seem ok to tell users that you're quitting the app, or that it's getting low on memory, but on the whole I'd have to agree with Apple, and most people just don't want to know, and just expect the app to work.

Upvotes: 3

Related Questions