function() {
      if (this.isDestroyed) { return this; }
      // #2134: remove parent element before destroying the child views, so
      // removing the child views doesn't retrigger repaints
      if (this.getOption('destroyImmediate') === true) {
        this.$el.remove();
      }
      this.regionManager.destroy();
      return Marionette.ItemView.prototype.destroy.apply(this, arguments);
    }
function() {
      if (this.isDestroyed) { return this; }
      
      
      if (this.getOption('destroyImmediate') === true) {
        this.$el.remove();
      }
      this.regionManager.destroy();
      return Marionette.ItemView.prototype.destroy.apply(this, arguments);
    }
function ( ) { if ( this . isDestroyed ) { return this ; } // #2134: remove parent element before destroying the child views, so // removing the child views doesn't retrigger repaints if ( this . getOption ( 'destroyImmediate' ) === true ) { this . $el . remove ( ) ; } this . regionManager . destroy ( ) ; return Marionette . ItemView . prototype . destroy . apply ( this , arguments ) ; }
Handle destroying regions, and then destroy the view itself.
Handle destroying regions and then destroy the view itself .