title: How to destroy an inactive view in Sencha Touch
body: <p>i stuck with a problem which is really important i guess.
  In a simple Sencha Touch App I have many views. My Mainview is a TabPanel with docking icons in the bottom. Sometimes in my App I switch to another views which are outside of the Tabpanel. I don't want the DOM to overload with views, i don't need anymore so i'm searching for a solution to destroy a view, when its inactive.
  I've tried this, while switching into another view in my controller:</p>
  
  <pre><code>this.getMainview().destroy();
  </code></pre>
  
  <p>It seems that the Mainview gets deleted but I get an error: </p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'dom' of null
  </code></pre>
  
  <p>So i guess something's wrong with the .destroy() - Method or is there a better way to handle this problem?</p>