title: Dismissing a viewController presented programmatically
body: <p>Many similar questions already posted, but I cannot seem to find a swift 3/IOS 10 answer. Start a new ViewController with this code ...</p>
  
  <pre><code> self.present(self.myNewVC, animated: true, completion: {                 
                  // some more here
              })
          }
  </code></pre>
  
  <p>And close it with this code ...</p>
  
  <pre><code>        self.myNewVC.dismiss(animated: true, completion: nil)
          self.myNewVC.view.removeFromSuperview()
          self.myNewVC.removeFromParentViewController()
  </code></pre>
  
  <p>It works and yet it is still hanging around and when I reopen it without restarting the whole app; I effectively open another on top of the first. What am I doing wrong here?</p>
  
  <p>Here is a screenshot from the debugger.</p>
  
  <p><a href="https://i.stack.imgur.com/Z9qpQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Z9qpQ.png" alt="enter image description here"></a></p>