title: Understand deinitialization and inheritance in swift language
body: <p>Let's say I have two classes: Base class and sub class like this:</p>
  
  <pre><code>class Base{
      var name: String?
      init() {
         name = "The base class"
      }
  
      deinit {
         println("call Deinitialization in base class")
         name = nil
      }
  }
  
  class Sub: Base{
      var subName: String?
      init() {
       super.init()
       subName = "The sub class"
      }
  
      deinit {
         println("call Deinitialization in sub class")
         subName = nil
         // does it really call super.deinit() ?
         // or assign name = nil ?
      }
  }
  </code></pre>
  
  <p>When the deinitializer of sub class is called, does it call <code>super.deinit()</code> to assign nil to <code>name</code> variable? Or I have to assign by hand in deinitializer  of subclass?</p>