문제

I've got an app that caches a pretty decent amount of data in memory after parsing a csv file, and also displays an MKMapView. After scrolling across the country from one end to the other in the MKMapView, the app inevitably gives me one or more:

Received memory warning. Level=1
Received memory warning. Level=2

and finally crashes due to low memory. I've been trying to figure out a means of managing either the memory of MKMapView or my own data (which comes from a csv file - the csv file needs to be written to frequently, so I'd like to keep it in memory in some fashion or other if possible, unless there is a better means of handling the issue.

Any ideas?

도움이 되었습니까?

해결책

Use instruments to determine how much memory the cached CSV is taking vs the MKMapView. If the CSV is the problem, then look at storing it using CoreData or sqlite.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top