mirror of https://github.com/axmolengine/axmol.git
Just a few more leak fixes
This commit is contained in:
parent
c80312bea6
commit
23093b9c53
|
@ -63,14 +63,14 @@
|
||||||
NSLog(@"Starting to load %@", srcURL);
|
NSLog(@"Starting to load %@", srcURL);
|
||||||
finish = false;
|
finish = false;
|
||||||
|
|
||||||
self.responseData = [NSMutableData new];
|
self.responseData = [NSMutableData data];
|
||||||
getDataTime = 0;
|
getDataTime = 0;
|
||||||
self.responseError = nil;
|
self.responseError = nil;
|
||||||
|
|
||||||
// create the connection with the target request and this class as the delegate
|
// create the connection with the target request and this class as the delegate
|
||||||
self.conn = [[NSURLConnection alloc] initWithRequest:request
|
self.conn = [[[NSURLConnection alloc] initWithRequest:request
|
||||||
delegate:self
|
delegate:self
|
||||||
startImmediately:NO];
|
startImmediately:NO] autorelease];
|
||||||
|
|
||||||
[self.conn scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
|
[self.conn scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
|
||||||
|
|
||||||
|
|
|
@ -281,7 +281,7 @@ static int processTask(HttpRequest *request, NSString* requestType, void *stream
|
||||||
}
|
}
|
||||||
|
|
||||||
//handle response header
|
//handle response header
|
||||||
NSMutableString *header = [NSMutableString new];
|
NSMutableString *header = [NSMutableString string];
|
||||||
[header appendFormat:@"HTTP/1.1 %ld %@\n", (long)httpAsynConn.responseCode, httpAsynConn.statusString];
|
[header appendFormat:@"HTTP/1.1 %ld %@\n", (long)httpAsynConn.responseCode, httpAsynConn.statusString];
|
||||||
for (id key in httpAsynConn.responseHeader)
|
for (id key in httpAsynConn.responseHeader)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue