View Full Version : scenario for didReceivedMemoryWarning to call

Oct 29, 2008, 11:58 AM
Hi all.

Can anyone tell me a scenario for didReceivedMemoryWarning in UIViewController get call by f/w ???

In my app i am geting a call to these method of my viewControllers (almost all) when i push Another one or do some similar operations..

Why so???

Oct 30, 2008, 09:00 AM
didReceiveMemoryWarning is called when the iPhone is running out of memory.

More detail here: https://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html

Make sure you're releasing objects in memory once you're done with them.

Oct 30, 2008, 09:43 AM
Use Instruments to see how much memory each view uses when it loads.