title: Why XCode Clean and Build fix EXC_BAD_ACCESS?
body: <p>I've seen lots of people (including me) facing the crash with <code>EXC_BAD_ACCESS</code> with unknown reason. A lot of answers with the solution <code>clean and build the project</code> marked as correct. </p>
  
  <p>I'm curious why this happens and how clean and re-build fixed it, but it seems people just don't care and go on with clean-build solution.</p>
  
  <p>Here's an <a href="https://stackoverflow.com/questions/41018210/exc-bad-access-error-for-invoking-method-in-swift">example</a> of those <code>EXC_BAD_ACCESS</code> with clean-build solution.</p>
  
  <p>In my case, I'm facing something as ridiculous as this:</p>
  
  <pre><code>func viewDidLoad() {
      super.viewDidLoad()
      self.childVC.delegate = self // =&gt; Crashed EXC_BAD_ACCESS here. Fixed after clean and build
  }
  </code></pre>
  
  <p>As far as I know, this happened in Swift a lot more usually than Objective-C. <del>Could it be Swift's features?</del></p>