mirror of https://github.com/axmolengine/axmol.git
Merge pull request #12103 from samuele3hu/v3_http_leak
Fix the memory leak of HttpClient on the iOS/Mac platform.
This commit is contained in:
commit
40ea6e3e41
|
@ -51,10 +51,10 @@
|
|||
[sslFile release];
|
||||
[responseHeader release];
|
||||
[responseData release];
|
||||
[statusString release];
|
||||
[responseError release];
|
||||
[conn release];
|
||||
[runLoop release];
|
||||
[connError release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
@ -178,10 +178,12 @@
|
|||
{
|
||||
CFDataRef errDataRef = SecTrustCopyExceptions(serverTrust);
|
||||
SecTrustSetExceptions(serverTrust, errDataRef);
|
||||
|
||||
SecTrustEvaluate(serverTrust, &trustResult);
|
||||
[(id)errDataRef release];
|
||||
}
|
||||
|
||||
[certData release];
|
||||
[(id)certArrayRef release];
|
||||
[(id)certArrayRef release];
|
||||
//Did our custom trust chain evaluate successfully?
|
||||
return trustResult = kSecTrustResultUnspecified || trustResult == kSecTrustResultProceed;
|
||||
}
|
||||
|
|
|
@ -217,7 +217,7 @@ static int processTask(HttpClient* client, HttpRequest* request, NSString* reque
|
|||
long len = sslCaFileName.length();
|
||||
long pos = sslCaFileName.rfind('.', len-1);
|
||||
|
||||
httpAsynConn.sslFile = [NSString stringWithUTF8String:sslCaFileName.substr(0, pos-1).c_str()];
|
||||
httpAsynConn.sslFile = [NSString stringWithUTF8String:sslCaFileName.substr(0, pos).c_str()];
|
||||
}
|
||||
[httpAsynConn startRequest:nsrequest];
|
||||
|
||||
|
|
Loading…
Reference in New Issue