Hi, When i run the instrument i got memory link in below line
NSData *responseData = [NSURLConnection sendSynchronousRequest:theRequest
returningResponse:&urlResponse error:&error];
Can some one explain me how to fix this issue,
Thanks Sam.
- (NSString *)sendHttpsReq:(NSString *) urlString {
// create the request
NSString *endResult = nil;
NSURL *posHostUrl = [NSURL URLWithString:urlString];
NSURLRequest *theRequest=[NSURLRequest requestWithURL:posHostUrl
cachePolicy:NSURLCacheStorageAllowed
timeoutInterval:300.0];
// create the connection with the request
// and start loading the data
[NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:[posHostUrl host]];
NSURLConnection *theConnection=[[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
if (theConnection) {
// Create the NSMutableData that will hold
// the received data
// receivedData is declared as a method instance elsewhere
NSHTTPURLResponse* urlResponse = nil;
//NSError *error = [[NSError alloc] init];
NSError *error = nil;
NSData *responseData = [NSURLConnection sendSynchronousRequest:theRequest returningResponse:&urlResponse error:&error];
endResult = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
//[error release];
} else{
//Inform the user that the connection failed.
NSLog(@"CONNECTION FAILED");
}
[theConnection release];
return [endResult autorelease];
}