title: UITableViewCell: understanding life cycle
body: <p>I have got a ViewController with a UITableView containing custom UITableViewCell subclasses.</p>
  
  <p>The project I am working on is based on a Master/Detail view controller template (the one from XCode 6). </p>
  
  <p>Things I noticed:</p>
  
  <ul>
  <li>when I go back to the Master view the <strong>dealloc method</strong> of the cell is <strong>not called</strong></li>
  <li>when I go from master to detail view (where the table is) the awake from nib method is called and then the dealloc method as well. I don't get this. Why would the dealloc method be called after the awake from nib?</li>
  </ul>
  
  <p>This is the current life cycle as I observed it:</p>
  
  <ul>
  <li>Once the table reload method is called it triggers awake from nib of the custom cell and then the dealloc method is called (why not before?)</li>
  </ul>
  
  <p>I added an NSLog on both methods of the subclass of UITableViewCell to observe this.</p>
  
  <p><strong>EDIT:</strong> my problem is that I have a UISlider in the custom cell. When the dealloc get called the updated slider value is there (E.g. say 10) but on the UI it does show the initial value set via interface builder (e.g. say 1). I assume that the default values are set again (restored) after dealloc is called. Is there a way to avoid this?</p>