title: Is it the right way using `[weak self]` in swift closure?
body: <p>I always using <code>[weak self]</code> in swift closure to prevent reference cycle.
  Here is the code below, is it the correct way? </p>
  
  <pre><code>someTask(completion: {[weak self] (result) in
          if self == nil {  
              return
          }
  
          //is it safe when reach here? 
  
          self!.xxx = yyy
          self!.doLongTermWork()
          self!.finish()  //will crash when self is nil?
      })
  </code></pre>
  
  <p>Weak self does not keep a strong hold on the instance. So when <code>self.doLongTermWork()</code>, will <code>self</code> be set to <code>nil</code> again somewhere else? </p>