Browse files

Manually copy the completion block to the property.

Blocks are not automatically copied by ARC, and that made the demo app crash in release mode after dismissing the WebView. Manually copying the completion block fixes this. Thanks Anton Petrov for finding (and fixing) this bug!

  • Loading branch information...
rsieiro committed Jan 22, 2012
1 parent 73ab8e9 commit a95d355dbf6c127ff1062be56cece53c53532349
Showing with 1 addition and 1 deletion.
  1. +1 −1 TwitterDemo/Twitter/RSTwitterEngine.m
@@ -169,7 +169,7 @@ - (void)retrieveOAuthTokenFromKeychain
- (void)authenticateWithCompletionBlock:(RSTwitterEngineCompletionBlock)completionBlock
// Store the Completion Block to call after Authenticated
- _oAuthCompletionBlock = completionBlock;
+ _oAuthCompletionBlock = [completionBlock copy];
// First we reset the OAuth token, so we won't send previous tokens in the request
[self resetOAuthToken];

0 comments on commit a95d355

Please sign in to comment.