docs: function() {
          // We can't destroy a scope that has been already destroyed.
          if (this.$$destroyed) return;
          var parent = this.$parent;
  
          this.$broadcast('$destroy');
          this.$$destroyed = true;
  
          if (this === $rootScope) {
            //Remove handlers attached to window when $rootScope is removed
            $browser.$$applicationDestroyed();
          }
  
          incrementWatchersCount(this, -this.$$watchersCount);
          for (var eventName in this.$$listenerCount) {
            decrementListenerCount(this, this.$$listenerCount[eventName], eventName);
          }
  
          // sever all the references to parent scopes (after this cleanup, the current scope should
          // not be retained by any of our references and should be eligible for garbage collection)
          if (parent && parent.$$childHead == this) parent.$$childHead = this.$$nextSibling;
          if (parent && parent.$$childTail == this) parent.$$childTail = this.$$prevSibling;
          if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling;
          if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling;
  
          // Disable listeners, watchers and apply/digest methods
          this.$destroy = this.$digest = this.$apply = this.$evalAsync = this.$applyAsync = noop;
          this.$on = this.$watch = this.$watchGroup = function() { return noop; };
          this.$$listeners = {};
  
          // Disconnect the next sibling to prevent `cleanUpScope` destroying those too
          this.$$nextSibling = null;
          cleanUpScope(this);
        }