title: Backend Completion Handler crashes app if completed after PushViewController
body: <p><strong>What I have</strong></p>
  
  <p>I don't understand the nature of the problem.</p>
  
  <p>I have 2 View Controllers : </p>
  
  <p>1) <strong>FeedViewController</strong> ,which shows events in tableview </p>
  
  <p>2) <strong>EventViewController</strong>, pushed when you press on event.</p>
  
  <p>When Feed Loads, it start asynchronous loadings of all images of all events.
  It's done for each event by following function:</p>
  
  <pre><code>    EventsManager().loadProfilePictureById(event.profilePictureID as String, currentProgress: event.profilePictureProgress, completionHandler: {
                          (progress:Double, image:UIImage!, error:NSError!) -&gt; Void in
                          event.profilePictureProgress = progress
                          if image != nil {
                              event.profilePicture = image
                          }
                          if (error == nil){
                              if (self.tableView.headerViewForSection(index) != nil){
                                  var header:eventHeaderView = self.tableView.headerViewForSection(index) as! eventHeaderView
                                  header.updateProfilePicture(
                                      self.eventsManager.events[index].profilePictureID as String,
                                      progress: self.eventsManager.events[index].profilePictureProgress,
                                      image: self.eventsManager.events[index].profilePicture)
                              }
                          }else{
                              println("Error:" + error.description)
                          }
                      })
  </code></pre>
  
  <p>Here is how I push <strong>EventViewController</strong>:</p>
  
  <pre><code>    func PushEventViewController(sender:UITapGestureRecognizer)-&gt;Void{
  
      let ViewSender = sender.view!
      let selectedRow = ViewSender.tag
      //let Cell:HomeEventTableViewCell = TimelineEventTable.cellForRowAtIndexPath(SelectedIndexPath) as HomeEventTableViewCell
      dispatch_async(dispatch_get_main_queue(), {
          () -&gt; Void in
          let VC:EventViewController = self.storyboard?.instantiateViewControllerWithIdentifier("EventViewController") as! EventViewController
          VC.event = self.eventsManager.events[selectedRow]
          self.navigationController?.pushViewController(VC, animated: true)
      })
  }
  </code></pre>
  
  <p><strong>Problem</strong></p>
  
  <p>The problem is that if I press on event and push <strong>EventViewController</strong> before image is downloaded (completion handlers are still getting called) it crashes app.</p>
  
  <p><strong>Assumptions</strong></p>
  
  <p>I struggled with this for days and couldn't find a solution,
  but my assumptions are that completion handler called after </p>
  
  <p><strong>Crash happens when it tries to execute following line after EventViewController was pushed:</strong></p>
  
  <pre><code>                        event.profilePictureProgress = progress
                          if image != nil {
                              event.profilePicture = image
                          }
  </code></pre>
  
  <p>I assume when new view controller is pushed , event object which is used in completion handler is being deallocated</p>