Permalink
Browse files

Release request redirected block. (Otherwise it will leak.)

  • Loading branch information...
1 parent 9d07768 commit 8bb232a430258fbfedbeba7ada5c72d58e03263c @yllan yllan committed with jogu Nov 11, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 Classes/ASIHTTPRequest.m
View
@@ -460,6 +460,11 @@ - (void)releaseBlocksOnMainThread
[authenticationNeededBlock release];
authenticationNeededBlock = nil;
}
+ if (requestRedirectedBlock) {
+ [blocks addObject:requestRedirectedBlock];
+ [requestRedirectedBlock release];
+ requestRedirectedBlock = nil;
+ }
[[self class] performSelectorOnMainThread:@selector(releaseBlocks:) withObject:blocks waitUntilDone:[NSThread isMainThread]];
}
// Always called on main thread

0 comments on commit 8bb232a

Please sign in to comment.