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);
finish = false;
self.responseData = [NSMutableData new];
self.responseData = [NSMutableData data];
getDataTime = 0;
self.responseError = nil;
// create the connection with the target request and this class as the delegate
self.conn = [[NSURLConnection alloc] initWithRequest:request
delegate:self
startImmediately:NO];
self.conn = [[[NSURLConnection alloc] initWithRequest:request
delegate:self
startImmediately:NO] autorelease];
[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
NSMutableString *header = [NSMutableString new];
NSMutableString *header = [NSMutableString string];
[header appendFormat:@"HTTP/1.1 %ld %@\n", (long)httpAsynConn.responseCode, httpAsynConn.statusString];
for (id key in httpAsynConn.responseHeader)
{