We have a web service iPhone app which fetches short texts (no graphics) in increment of 10 records – user can load more records by pressing ‘load more’ button. (akin to ‘load 25 more’ in default ‘App Store’ App)
Currently, NSXMLParser is used to parse the XML, the records are stored then in NSMutableArray, and new records (from ‘load more’) are appended to the array.
Now, we are experiencing two problems, which we believe are related to our current method of storing the records into the RAM. These are:
- In low memory conditions, when we switch back to the App from app switcher, and then press ‘back’ button from the detail view, App either crashes or reloads the table view!
- After having just 400 records loaded the app crashes!
To combat these issues, will, just storing the records into SQLite (or Core Data) instead of an array, do it? Or we need to do something more/different?
Please guide!
Thanks!
resolved it… after reading @Steven’s comment… I got convinced that it was not memory issue… so, I digged further, & found the issue.
Actually, I have a
deselectRowAtIndexPathmethod in tableview. And in low memory environment, iPhone releases the records stored in memory… so, in that situation,deselectRowAtIndexPathwas pointing to nothing, which was causing the crash… modified & resolved it now!Thanks!