title: Blocks and objects with Strong Reference Cycle?
body: <p>When you create an instance of a class, which has a block, it points to that block as a strong reference, and when you reference the object from that block it points to that object with a strong reference, which creates a strong reference cycle. </p>
  
  <p>So if I were to do this:</p>
  
  <pre><code>__weak Employee *weakSelf = self;
  myBlock = ^{
      NSLog(@"%@", weakSelf);
  }
  </code></pre>
  
  <p>So now, the block has a weak reference to the object, but supposedly it's good practice to create a strong local reference to self inside the block in case the object that self points to is deallocated.</p>
  
  <pre><code>__weak Employee *weakSelf = self;
  myBlock = ^{
      Employee *innerSelf = weakSelf;
      NSLog(@"%@", innerSelf);
  }
  </code></pre>
  
  <p>I wanted to know and make sure that I understand this correctly, so I drew a picture of what I think is happening (If I'm wrong, please correct me):
  <a href="https://i.stack.imgur.com/qFXBf.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qFXBf.jpg" alt="enter image description here"></a></p>
  
  <p>Or is this correct:
  <a href="https://i.stack.imgur.com/U9kvw.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/U9kvw.jpg" alt="enter image description here"></a></p>
  
  <p>A corrected visual would be greatly appreciated.</p>