iphoneselectormkreversegeocoder

using performSelector


i've my method that implement a reverseGeocoder

- (void)reversing { 
 geoCoder=[[MKReverseGeocoder alloc] initWithCoordinate:locManager.location.coordinate];
 geoCoder.delegate=self;
 [geoCoder start]; 
}

i recall reversing in another method with this:

[self performSelector:@selector(reversing) withObject:nil afterDelay:10];

and i receive

2010-04-30 17:44:17.616 high[1167:207] Retrive City Milano
2010-04-30 17:44:17.628 high[1167:207] geocoder released
2010-04-30 17:44:18.723 high[1167:207] Error Domain=MKErrorDomain Code=4 "Operation     
could not be completed. (MKErrorDomain error 4.)"
Program received signal:  “EXC_BAD_ACCESS”.

Can someone help me? :D


Solution

  • It looks like you are releasing either the geocoder or its delegate, which causes the BAD_ACCESS. Odds are good that you have already released it in your error handler, or possibly via dealloc when your calling object is released.