-1

Possible Duplicate:
iPhone: helpfulness of didReceiveMemoryWarning:
How to implement didReceiveMemoryWarning?

I want to know how this function works. It calls the parent class's didReceiveMemoryWarning. But I don't know that what is written in this function and how it works.

Community
  • 1
  • 1
Nick
  • 59
  • 5
  • 1
    You can see [HERE](http://www.uchidacoonga.com/2009/08/handling-didreceivememorywarning/), and [HERE](http://stackoverflow.com/questions/2430728/how-to-implement-didreceivememorywarning) is a question on "How to implement didReceiveMemoryWarning?". :) – Kjuly Dec 08 '11 at 05:11

1 Answers1

1

didReceiveMemoryWarning is called when the class starts using too much memory. You can use this method to release objects that are not being used such as images, arrays, dictionaries, etc.

WrightsCS
  • 50,551
  • 22
  • 134
  • 186
  • How can i see the code written in the body of didReceiveMemoryWarning ? – Nick Dec 08 '11 at 05:14
  • You write the code. Standard code in `didReceiveMemoryWarning ` is **`[super didReceiveMemoryWarning];`** – WrightsCS Dec 08 '11 at 05:29
  • I know that this is calling the parent class didReceiveMemoryWarning function. but what is written in the parent class didReceiveMemoryWarning function? – Nick Dec 08 '11 at 05:32
  • Your question doesn't make any sense. Read the documentation on it here: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIViewController_Class/Reference/Reference.html – WrightsCS Dec 08 '11 at 05:33
  • Don't mind but tell me that without any body how can [super didReceiveMemoryWarning]; this function works? I have only 4 month experience in iPhone and i want to clear my all problems in iPhone. thats why i have posted this question. – Nick Dec 08 '11 at 05:51
  • 2
    I already explained to you that you need to release unused objects. See the above answer, theres not much more to it. – WrightsCS Dec 08 '11 at 06:07