title: Should I Use "weakSelf" In a dispatch Block?
body: <p>I've heard that I should always use <code>weakSelf</code> in blocks to avoid retain cycles, but what about dispatch blocks? In this case, my method handles an error response from my server in the following code:</p>
  
  <pre><code>//handling server errors (particularly "Token Refresh Failed" ones)
  -(void)handleServerErrorResponse:(NSString *)error {
      dispatch_async(dispatch_get_main_queue(), ^{
          UIAlertController *alertController = [DialogHelper getAlertForSimpleAuthError:error];
          if ([error isEqualToString:@"Your login session has expired"]) {
              [alertController addAction:[UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action)
              {
                  [MyModelDataCenter emptyDataCenter];
                  [MyAPIInterface sharedInstance].authToken = nil;
                  NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
                  [defaults removeObjectForKey:@"authToken"];
                  [defaults removeObjectForKey:@"defaultUserObjectDictionary"];
                  [defaults synchronize];
                  [AuthenticationHelper sharedInstance].loggedInUser = nil;
                  [self.navigationController popToRootViewControllerAnimated:YES];
              }]];
          }
          else {
              [alertController addAction:[UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault handler:nil]];
          }
          [self presentViewController:alertController animated:YES completion:nil];
      });
  }
  </code></pre>
  
  <p>Should I be using <code>weakSelf</code> in this block the same as I do it in other blocks?</p>