src/View.js
function()
	{
		this._destroyBinding();

		if(this._collectionBinder) this._collectionBinder.destroyBoundViews();

		this._modelBindersMap = null;
		this._collectionBinder = null;
		this._bindingIndex = null;
		this._itemAlias = null;

		this.element.removeAttribute(settings.DATA_RENDERED_ATTR);
		this.undelegateEvents();
		this.destroySubviews();
		if(this.dispatcher)
		{
			this.dispatcher.off('refresh', this.f('refreshAll'));
			this.dispatcher.off('refreshFromRoot', this.f('refreshFromRoot'));
			this.dispatcher.off('refreshRaf', this.f('requestRefreshAll'));
			this.dispatcher.off('refreshFromRootRaf', this.f('requestRefreshAllFromRoot'));
			this.dispatcher.off('dispatcher:noaction', this.f('_dispatchNoAction'));
		}

		if(this.destroy !== noop) this.destroy();
		if(typeof this.afterDestroy === 'function') this.afterDestroy();

		this._subviewsStruct = null;
		this._explicitSubviewsStruct = null;
		this.subviews = null;
		this._isRunning = false;
		this._isSuspended = false;
	}
function()
	{
		this._destroyBinding();

		if(this._collectionBinder) this._collectionBinder.destroyBoundViews();

		this._modelBindersMap = null;
		this._collectionBinder = null;
		this._bindingIndex = null;
		this._itemAlias = null;

		this.element.removeAttribute(settings.DATA_RENDERED_ATTR);
		this.undelegateEvents();
		this.destroySubviews();
		if(this.dispatcher)
		{
			this.dispatcher.off('refresh', this.f('refreshAll'));
			this.dispatcher.off('refreshFromRoot', this.f('refreshFromRoot'));
			this.dispatcher.off('refreshRaf', this.f('requestRefreshAll'));
			this.dispatcher.off('refreshFromRootRaf', this.f('requestRefreshAllFromRoot'));
			this.dispatcher.off('dispatcher:noaction', this.f('_dispatchNoAction'));
		}

		if(this.destroy !== noop) this.destroy();
		if(typeof this.afterDestroy === 'function') this.afterDestroy();

		this._subviewsStruct = null;
		this._explicitSubviewsStruct = null;
		this.subviews = null;
		this._isRunning = false;
		this._isSuspended = false;
	}
function ( ) { this . _destroyBinding ( ) ; if ( this . _collectionBinder ) this . _collectionBinder . destroyBoundViews ( ) ; this . _modelBindersMap = null ; this . _collectionBinder = null ; this . _bindingIndex = null ; this . _itemAlias = null ; this . element . removeAttribute ( settings . DATA_RENDERED_ATTR ) ; this . undelegateEvents ( ) ; this . destroySubviews ( ) ; if ( this . dispatcher ) { this . dispatcher . off ( 'refresh' , this . f ( 'refreshAll' ) ) ; this . dispatcher . off ( 'refreshFromRoot' , this . f ( 'refreshFromRoot' ) ) ; this . dispatcher . off ( 'refreshRaf' , this . f ( 'requestRefreshAll' ) ) ; this . dispatcher . off ( 'refreshFromRootRaf' , this . f ( 'requestRefreshAllFromRoot' ) ) ; this . dispatcher . off ( 'dispatcher:noaction' , this . f ( '_dispatchNoAction' ) ) ; } if ( this . destroy !== noop ) this . destroy ( ) ; if ( typeof this . afterDestroy === 'function' ) this . afterDestroy ( ) ; this . _subviewsStruct = null ; this . _explicitSubviewsStruct = null ; this . subviews = null ; this . _isRunning = false ; this . _isSuspended = false ; }
Destroys the view (destroys all subviews and unbinds previously bound DOM events.
It will be called automatically. Should not be called directly.
Destroys the view ( destroys all subviews and unbinds previously bound DOM events . It will be called automatically . Should not be called directly .