2

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.

enter image description here

Thread on Apple Developer Forums.

Open Radar

Boris Y.
  • 4,387
  • 2
  • 32
  • 50

1 Answers1

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