examples/map/js/backbone.marionette.js
function(view){
      var viewCid = view.cid;

      // delete model index
      if (view.model){
        delete this._indexByModel[view.model.cid];
      }

      // delete custom index
      _.any(this._indexByCustom, function(cid, key) {
        if (cid === viewCid) {
          delete this._indexByCustom[key];
          return true;
        }
      }, this);

      // remove the view from the container
      delete this._views[viewCid];

      // update the length
      this._updateLength();
    }
function(view){
      var viewCid = view.cid;

      // delete model index
      if (view.model){
        delete this._indexByModel[view.model.cid];
      }

      // delete custom index
      _.any(this._indexByCustom, function(cid, key) {
        if (cid === viewCid) {
          delete this._indexByCustom[key];
          return true;
        }
      }, this);

      // remove the view from the container
      delete this._views[viewCid];

      // update the length
      this._updateLength();
    }
function ( view ) { var viewCid = view . cid ; // delete model index if ( view . model ) { delete this . _indexByModel [ view . model . cid ] ; } // delete custom index _ . any ( this . _indexByCustom , function ( cid , key ) { if ( cid === viewCid ) { delete this . _indexByCustom [ key ] ; return true ; } } , this ) ; // remove the view from the container delete this . _views [ viewCid ] ; // update the length this . _updateLength ( ) ; }
Remove a view
Remove a view