title: Swift value disappeared inside a closure
body: <p>I have the following code: </p>
  
  <pre><code>    let context = DBHelper.privateContext()
      context.performBlock({ [weak self] in
          if let ss = self {
              //1. 
              let articles = DBHelper.clientFetchArticles(context) 
              //2. 
              dispatch_async(dispatch_get_main_queue(), {
                  //3. 
                  ss.articles = articles
                  ss.tableView.reloadData()
                  ss.refreshControl.endRefreshing()
              })
          }
      })
  </code></pre>
  
  <p>After calling <code>tableView.reloadData()</code>, the following code runs: </p>
  
  <pre><code>func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
      let cell = tableView.dequeueReusableCellWithIdentifier("ArticleCell", forIndexPath: indexPath) as! ArticleCell
  
      #4
      let article = articles[indexPath.row]
  
  
      cell.setupWithArticle(article)
  
      return cell
  }
  </code></pre>
  
  <p><code>DBHelper.clientFetchArticles</code> will return <code>[Article]</code> with 2 articles (of type ManagedObject). </p>
  
  <ul>
  <li><p>At #1, when I print <code>po articles[0].title</code>, I get the correct <code>title</code> print out. </p></li>
  <li><p>At #3, <code>po articles.count</code> prints <code>2</code>, <code>po articles[0].title</code> is also correct</p></li>
  <li><p>At #4, <code>po self.articles[0].title</code> gets nil. </p></li>
  </ul>
  
  <p>I have tried <code>dispatch_sync(dispatch_get_main_queue())</code> but still the same result. </p>