I am getting a leaked NSCFString from this code. I understand it has to do with the NSString however, I do not understand how the leak is happening. Thanks for your help in advance…
-(void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark{
NSString *pTitle = [[NSString alloc] initWithString:placemark.title];
mapView.userLocation.title = pTitle;
[pTitle release];
}
Are you also leaking a map view? In that case the reported leak of this string is just by extension of the leaked map view.
Most often the most leaked object is not the culprit. The culprit is usually a single object holding on to a dozen of the most leaked object.
Also, you can cut down your code to:
No need doing memory management when not needed :).