Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

requestRedirectedBlock retain issue #279

Closed
BasitAli opened this Issue Oct 22, 2011 · 4 comments

Comments

Projects
None yet
3 participants

I noticed in a recent project that when I set the requestRedirectedBlock, it is not released when the request is finished. The releaseBlocksOnMainThread method calls release on all blocks except requestRedirectedBlock. I added in the release and the controller that initialized the request is now releasing properly. Is it really an issue or am I missing something?

Oh and thanks for the brilliant library :).

Contributor

fpillet commented Oct 31, 2011

I've seen the same issue, ASIHTTPRequest is missing a release for its redirect block. Unfortunately, Ben stopped maintaining the code but you can fix it by adding this to - releaseBlockOnMainThread:

if (requestRedirectedBlock) {
    [blocks addObject:requestRedirectedBlock];
    [requestRedirectedBlock release];
    requestRedirectedBlock = nil;
}

Thanks, that's what I did to resolve the issue. But as suggested I would better move to a different library. Which one do you suggest? I've read that AFNetworking is a good choice to switch to.

Contributor

fpillet commented Nov 10, 2011

AFNetworking may be a good choice if its feature set suits you, and if you can afford requiring iOS 4.0 and up. I have not tried it though - have to keep some level of 3.x compatibility for the time being.

Collaborator

jogu commented Jan 14, 2012

Fix merged - thanks!

@jogu jogu closed this Jan 14, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment