title: UISearchController retain issue
body: <p>I am trying to use UISearchController however I confronted with retain issue that I can't solve. MainTableview has two sections. </p>
  
  <p>Section 1</p>
  
  <p>Filtered Data based on some Regex</p>
  
  <p>Section 2</p>
  
  <p>All Data</p>
  
  <p>I added UISearchController to my tableview and attached ResultsTableController as resultsTableController. It works when user search something, ResultsTableController comes forward and because I set tableview delegate to self, selecting item from ResultsTableController calls didSelectRowAtIndexPath in my MainTableViewController. However I have allocation issue if user selects something from resultsTableController.</p>
  
  <p>Following happens for different scenarios</p>
  
  <ul>
  <li>User doesn't search anything, just selects an item from
  MainTableview, I see deinit messages</li>
  <li>User searches something, cancel the search, select item from
  MainTableview, I see deinit messages</li>
  <li>User searches something, and selects an item from
  ResultsTableController, I don't get deinit in my viewcontrollers</li>
  </ul>
  
  <p><strong>MainTableViewController.swift</strong></p>
  
  <pre><code>var searchController: UISearchController!
  
  // Secondary search results table view.
  var resultsTableController: ResultsTableController!
  var allCompanies = ["Data1","Data2","Data3"]
  
  override func viewDidLoad() {
      super.viewDidLoad()
       resultsTableController = ResultsTableController()
      // We want to be the delegate for our filtered table so didSelectRowAtIndexPath(_:) is called for both tables.
      resultsTableController.tableView.delegate = self
      searchController = UISearchController(searchResultsController: resultsTableController)
      searchController.searchResultsUpdater = self
      searchController.searchBar.sizeToFit()
      tableView.tableHeaderView = searchController.searchBar
  
      searchController.delegate = self
      searchController.dimsBackgroundDuringPresentation = false 
      searchController.searchBar.delegate = self   
      definesPresentationContext = true
      }
  }
  
  
  
  // MARK: UISearchBarDelegate
  
  func searchBarSearchButtonClicked(searchBar: UISearchBar) {
      searchBar.resignFirstResponder()
  }
  
  // MARK: UISearchResultsUpdating
  func updateSearchResultsForSearchController(searchController: UISearchController) {
      // Update the filtered array based on the search text.
  
      let filteredResults = allCompanies.filter({ company in
          (company.lowercaseString as NSString).containsString(searchController.searchBar.text.lowercaseString)
      })
  
      // Hand over the filtered results to our search results table.
      let resultsController = searchController.searchResultsController as! ResultsTableController
      resultsController.searchResult = filteredResults
      resultsController.tableView.reloadData()
  }
  
  // usual tableview methods
  
      override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
  
          if resultsTableController.searchResult.count &gt; 0 {
          selectedCompany = resultsTableController.searchResult[index]
          //do something with selected company
          navigationController?.popViewControllerAnimated(true)
          return
       }
       //
       selectedCompany = allCompanies[index]
        navigationController?.popViewControllerAnimated(true)
  
  }
  
  deinit {
      println("MainTableView deinit")
  }
  </code></pre>
  
  <p><strong>ResultTableController.swift</strong></p>
  
  <pre><code>class ResultsTableController:UITableViewController {
  
       var searchResult = [String]()
  
      override func viewDidLoad() {
          super.viewDidLoad()
          tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: "cell")
       }
  
      override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
  
          return searchResult.count
      }
  
      override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
  
          let cell = tableView.dequeueReusableCellWithIdentifier("cell", forIndexPath: indexPath) as! UITableViewCell
          let index = indexPath.row
          cell.textLabel?.font = UIFont(name: "Avenir-Roman", size: 16)
          cell.textLabel?.text = searchResult[index].description
          return cell
  
      }
  
      deinit {
          println("ResultTableController deinit")
      }
  }
  </code></pre>