title: Will referencing weakSelf from within a method called by weakSelf cause a retain cycle?
body: <p>I think I understand how simple retain cycles are create but I don't fully understand more complicated situations.</p>
  
  <p>Here is code that would cause a retain cycle. (right?)</p>
  
  <pre><code>[self.dataController loadInitialWithCompletion:^(BOOL dataChanged) {
      self.loading = NO;
  }];
  </code></pre>
  
  <p>To avoid that retain cycle I would create a weak reference to <code>self</code>:</p>
  
  <pre><code>__weak typeof(self) welf = self;
  [self.dataController loadInitialWithCompletion:^(BOOL dataChanged) {
      welf.loading = NO;
  }];
  </code></pre>
  
  <p>I hope I'm correct so far.</p>
  
  <p>Here's where it gets interesting. I have a method that calculates and caches text heights and then calls reloadData on a tableView. That method executes asynchronously and calls it's completionBlock (on the mainThread) when it's finished.</p>
  
  <pre><code> __weak typeof(self) welf = self;
  [self.dataController loadInitialWithCompletion:^(BOOL dataChanged) {
      [welf relayoutWithCompletion:^(CGPoint offsetBeforeReload) {
          welf.loading = NO;
  
          if (dataChanged) {
              [welf save];
          }
  
      }];
  }];
  </code></pre>
  
  <p>Will this code cause a retain cycle because <code>welf</code> captures itself in the completionBlock for <code>relayoutWithCompletion:</code>? Am I correct in thinking that because welf is a weak reference I will avoid a retain cycle? </p>
  
  <p>What if I took it a step further?</p>
  
  <pre><code> __weak typeof(self) welf = self;
  [self.dataController loadInitialWithCompletion:^(BOOL dataChanged) {
      [welf relayoutWithCompletion:^(CGPoint offsetBeforeReload) {
  
          if (offsetBeforeReload.y &gt; 64) {
              [welf scrollToPoint:offsetBeforeReload completion:^{
                  welf.loading = NO;
                  [welf save];
  
              }];
          }
  
      }];
  }];
  </code></pre>
  
  <p>It's welf all the way down...</p>