title: Swift Memory management when pass a closure as parameter to singleton
body: <p>I'm aware of the fact that <code>closure</code> can create <code>retain cycles</code> if it is assigned to a property of a class and instance properties of the class are used inside of the closure. But</p>
  
  <p>1) <strong>what about the closure is not assigned to the class property but passed as parameter to a singleton's class method ?</strong></p>
  
  <p>2) <strong>How the memory is managed in this case ?</strong></p>
  
  <p>In a method of my controller (UIViewController) I have something like:</p>
  
  <pre><code>MySingleton.classMethod(parameters ..., completion: { () -&gt; Void in
     /**
     doing stuff here
     */
  })
  </code></pre>