views:

47

answers:

1

Hi all,

In my application I have a tableview which a couple of cells on click of which I launch webview but my application crashes giving me memory warning level 2 even before the webview loads. I have cleared most of the memory leaks. How should I respond to this memory warning?

They say that I have to unload the unwanted views. I'm confused here a bit. What should I be unloading here the webview, the tableview?

Can anybody please help?

Thanx in advance.

A: 

Implement the didReceivedMemoryWarning method to clear every memory you don't need (i.e. datasource of your tableview and views that are not part of any hierarchy and therefore not shown). Those methods (one on each view controller) will be called in response to memory warning Level 1 and 2.

Always implement that method in every viewController you have !

Also "Most of the memory leaks ?" is not sufficient : clear them ALL !

VdesmedT