From 538d244a469df91191df015c817bf91d324fa2ce Mon Sep 17 00:00:00 2001 From: Mattt Thompson Date: Thu, 2 Jun 2011 15:28:28 -0500 Subject: [PATCH] Fixing memory leak in AFImageRequest +operationWithRequest:callback: --- AFNetworking/AFImageRequestOperation.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AFNetworking/AFImageRequestOperation.m b/AFNetworking/AFImageRequestOperation.m index e23ec2b..ae9d444 100644 --- a/AFNetworking/AFImageRequestOperation.m +++ b/AFNetworking/AFImageRequestOperation.m @@ -35,7 +35,7 @@ static inline CGSize kAFImageRequestRoundedCornerRadii(CGSize imageSize) { @synthesize callback = _callback; + (id)operationWithRequest:(NSURLRequest *)urlRequest callback:(AFImageRequestOperationCallback *)callback { - return [[self alloc] initWithRequest:urlRequest callback:callback]; + return [[[self alloc] initWithRequest:urlRequest callback:callback] autorelease]; } - (id)initWithRequest:(NSURLRequest *)urlRequest callback:(AFImageRequestOperationCallback *)callback {