Just a few more leak fixes

This commit is contained in:
Mazyad Alabduljaleel 2015-02-25 10:56:25 +04:00
parent c80312bea6
commit 23093b9c53
2 changed files with 5 additions and 5 deletions

View File

@ -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];

View File

@ -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)
{ {