Hello,
Here is my sample code where I am having problem.
I need to submit by lat long to the the server which I am doing it as above. But I am getting a Memory leak with the NSMutableString. When I tried to release the string after I did the submit my submitDetails method is not able to access the logString .
Can some one guide me on how to resolve this issue.
Thanks for the help
Here is my sample code where I am having problem.
PHP:
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
{
NSLog(@"in here--------");
CLLocationCoordinate2D loc = [newLocation coordinate];
NSMutableString *logString = [[NSMutableString alloc] initWithString: @"MyData="];
[logString appendString: myText.text];
[logString appendString: @"&MyLat="];
[logString appendString: [NSString stringWithFormat: @"%f", loc.latitude]];
[logString appendString: @"&MyLong="];
[logString appendFormat: [NSString stringWithFormat: @"%f", loc.longitude]];
NSLog(logString);
[SubmitData submitMyDetails: logString];
//[logString release];
}
I need to submit by lat long to the the server which I am doing it as above. But I am getting a Memory leak with the NSMutableString. When I tried to release the string after I did the submit my submitDetails method is not able to access the logString .
Can some one guide me on how to resolve this issue.
Thanks for the help