diff --git a/AFGowallaAPI.m b/AFGowallaAPI.m index de92864..a115b8b 100644 --- a/AFGowallaAPI.m +++ b/AFGowallaAPI.m @@ -82,7 +82,7 @@ static NSOperationQueue *_operationQueue = nil; + (NSMutableURLRequest *)requestWithMethod:(NSString *)method path:(NSString *)path parameters:(NSDictionary *)parameters { NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease]; - NSMutableDictionary *headers = [_defaultHeaders mutableCopy]; + NSMutableDictionary *headers = [NSMutableDictionary dictionaryWithDictionary:_defaultHeaders]; NSURL *url = nil; NSMutableArray *mutableParameterComponents = [NSMutableArray array]; diff --git a/AFHTTPOperation.m b/AFHTTPOperation.m index 37286bb..47395c5 100644 --- a/AFHTTPOperation.m +++ b/AFHTTPOperation.m @@ -89,7 +89,7 @@ NSString * const AFHTTPOperationParsedDataErrorKey = @"com.alamofire.http-operat [userInfo setValue:[[self.lastRequest URL] absoluteString] forKey:NSURLErrorFailingURLStringErrorKey]; [userInfo setValue:data forKey:AFHTTPOperationParsedDataErrorKey]; - error = [[NSError alloc] initWithDomain:NSURLErrorDomain code:[self.lastResponse statusCode] userInfo:userInfo]; + error = [[[NSError alloc] initWithDomain:NSURLErrorDomain code:[self.lastResponse statusCode] userInfo:userInfo] autorelease]; if (self.callback.errorBlock) { self.callback.errorBlock(self.lastRequest, self.lastResponse, error); diff --git a/AFImageRequestOperation.m b/AFImageRequestOperation.m index 55772f5..376fc73 100644 --- a/AFImageRequestOperation.m +++ b/AFImageRequestOperation.m @@ -33,7 +33,7 @@ static inline CGSize kAFImageRequestRoundedCornerRadii(CGSize imageSize) { } @implementation AFImageRequestOperation -@synthesize callback; +@synthesize callback = _callback; - (id)initWithRequest:(NSURLRequest *)someRequest callback:(AFImageRequestOperationCallback *)someCallback { self = [super initWithRequest:someRequest]; @@ -74,8 +74,8 @@ static inline CGSize kAFImageRequestRoundedCornerRadii(CGSize imageSize) { [super finishWithError:error]; if (error) { - if (callback.errorBlock) { - callback.errorBlock(error); + if (self.callback.errorBlock) { + self.callback.errorBlock(error); } return;