title: When does a scope naturally get destroyed in angularjs lifecycle
body: <p>I see this type of code a lot in angular modules</p>
  
  <pre><code>scope.$on('$destroy', function(){
    //undind listener here
  });
  </code></pre>
  
  <p>My understanding is that whenever the scope is about to be destroyed it broadcasts a <code>$destroy</code> event allowing you to clean up any code that may continue to run after the destruction of the scope which would create memory leaks.  </p>
  
  <p>My question is, when does the scope naturally get destroyed in an angularjs app.  All the documentation I can find from the website is that you can manually call <code>$destroy</code> to remove a scope, but this seems to suggest that it will happen at some point automatically.  When would that be?</p>