title: Why is it bad practice to have a viewController dismiss itself?
body: <p>I have two view controllers, <code>MainVC</code> and <code>ModalVC</code>.</p>
  
  <p>When the user taps a button on <code>MainVC</code>, the modal view controller appears.</p>
  
  <p>The user can then tap another button to dismiss it and return to the main one.</p>
  
  <p>I have tried these two methods and they both accomplish the same thing: they dismiss the modal view controller:</p>
  
  <pre><code>//method 1:
  //  File: ModalVC.swift
  //
  @IBAction func dismissTapped() {
       self.dismissViewControllerAnimated(false, completion: nil);
  }
  </code></pre>
  
  <p>That works fine as I said, but consider the other method: using delegation to let the main controller do the dismissing:</p>
  
  <pre><code>// method 2: part A 
  // File: ModalVC.swift
  // 
  protocol ModalVCDelegate {
      func modalVCDismissTapped();
  }
  ...
  ...
  ...
  var delegat:ModalVCDelegate? = nil;
  ...
  ...
  @IBAction func dismissTapped() {
      delegate.modalVCDismissTapped();
  }
  </code></pre>
  
  <p>and on the main view controller custom class file:</p>
  
  <pre><code>// method 2: part B
  // File: MainVC.swift
  
  class MainVC : UIViewController, ModalVCDelegate {
  ...
  ...
      func modalVCDismissTapped() {
          self.dismissViewControllerAnimated(false, completion: nil);
      }
  }
  </code></pre>
  
  <p>Since these two methods do the needful, should I worry about any possible memory leakage?</p>
  
  <p>Any explanation would help</p>