Reputation:
In my app I have several data objects stored in NSMmutableArray's
that I clear by removeAllObjects
in didReceiveMemoryWarning
of my application. Also setting the tableview that displays the data to nil. How do I reload the data & views again?
I've read that only resources that can be recreated easily should be disposed off in didReceiveMemoryWarning
. I load the data array in viewDidLoad
only. But this method is not called after didReceiveMemoryWarning
so the data is never populated again.
Pardon me if this has been asked before, I've just not had a proper understanding from similar questions, still relatively new to iOS development.
Thank you in advance.
Edit: I'm triggering memory warnings in the Simulator so I can learn and manage such conditions if they were to arise on actual usage of the app.
Upvotes: 2
Views: 195