I have encountered nasty memory leak in the Apple sample project. This is MapKit sample project which demonstrates how to do clustering. All you need to reproduce this is to spin map around, memory usage grows non stop until app crashes. You can download project here.
Asked
Active
Viewed 111 times
1 Answers
1
It looks like there's an infinite loop here, caused by the gridSize becoming negative upon rotation. Without looking into it in depth, getting the absolute value seems to stop the infinite loop and thus the increased memory consumption.
double gridSize = fabs(MKMapPointForCoordinate(rightCoordinate).x - MKMapPointForCoordinate(leftCoordinate).x);

Aodh
- 662
- 1
- 7
- 24