So aktualisieren Sie die Position eines GPS-Anzeige auf mapView ...
[mapView removeAnnotation:myGpsAnnotation];
[myGpsAnnotation release];
myGpsAnnotation = nil;
myGpsAnnotation = [[MapLocationAnnotation alloc] initWithCoordinate:region.center annotationType:MapAnnotationTypeGps title:MAP_ANNOTATION_TYPE_GPS];
[mapView addAnnotation:myGpsAnnotation];
... Ich sehe langsam Netto-Speicher in Instruments (Simulator) klettern. No Leak Blip, aber Net Bytes und # Net langsam erhöht wird ... es sei denn, dieser Code als Kommentar gekennzeichnet. Also ich bin 100% sicher, dies ist der säumige Code.
Aber wenn ich die folgende ...
[mapView removeAnnotation:myGpsAnnotation];
[myGpsAnnotation release];
myGpsAnnotation = nil;
myGpsAnnotation = [[MapLocationAnnotation alloc] initWithCoordinate:region.center annotationType:MapAnnotationTypeGps title:MAP_ANNOTATION_TYPE_GPS];
[mapView addAnnotation:myGpsAnnotation];
[mapView removeAnnotation:myGpsAnnotation];
[mapView addAnnotation:myGpsAnnotation];
[mapView removeAnnotation:myGpsAnnotation];
[mapView addAnnotation:myGpsAnnotation];
... dann ist das „Net Bytes“ und „# Net“ viel schneller erhöhen. Ist es möglich, das ist nicht mein Fehler, und ich versuche, ein Leck in MapKit aufzuspüren? Bin ich wirklich Speicher undicht? Auch hier scheint nichts unter „Leaks“, aber dann würde ich sehe nicht, warum Nettowerte steigen ständig werden.
Vielen Dank für jede Hilfe, -Gord













