title: how to call deinit method within class definition in swift
body: <p>I want to define a method that can destroy the instance it belongs to when a variable in this class has increased to a certain value. I attempted to do something like following:</p>
  
  <pre><code> var calledTimes = 0 //some other method would update this value
  
   func shouldDestroySelf(){
     if calledTimes == MAX_TIMES {
       denit
     }
   } 
  </code></pre>
  
  <p>But i would get error message saying "Expect '{' for deinitializers".</p>
  
  <p>Is there anyway to self-destruct within the class?</p>