examples/map/js/backbone.marionette.js
function(){
    // if we are not initialized, don't bother finalizing
    if (!this._isInitialized){ return; }
    this._isInitialized = false;

    Marionette.triggerMethod.call(this, "before:stop");

    // stop the sub-modules; depth-first, to make sure the
    // sub-modules are stopped / finalized before parents
    _.each(this.submodules, function(mod){ mod.stop(); });

    // run the finalizers
    this._finalizerCallbacks.run(undefined,this);

    // reset the initializers and finalizers
    this._initializerCallbacks.reset();
    this._finalizerCallbacks.reset();

    Marionette.triggerMethod.call(this, "stop");
  }
function(){
    // if we are not initialized, don't bother finalizing
    if (!this._isInitialized){ return; }
    this._isInitialized = false;

    Marionette.triggerMethod.call(this, "before:stop");

    // stop the sub-modules; depth-first, to make sure the
    // sub-modules are stopped / finalized before parents
    _.each(this.submodules, function(mod){ mod.stop(); });

    // run the finalizers
    this._finalizerCallbacks.run(undefined,this);

    // reset the initializers and finalizers
    this._initializerCallbacks.reset();
    this._finalizerCallbacks.reset();

    Marionette.triggerMethod.call(this, "stop");
  }
function ( ) { // if we are not initialized, don't bother finalizing if ( ! this . _isInitialized ) { return ; } this . _isInitialized = false ; Marionette . triggerMethod . call ( this , "before:stop" ) ; // stop the sub-modules; depth-first, to make sure the // sub-modules are stopped / finalized before parents _ . each ( this . submodules , function ( mod ) { mod . stop ( ) ; } ) ; // run the finalizers this . _finalizerCallbacks . run ( undefined , this ) ; // reset the initializers and finalizers this . _initializerCallbacks . reset ( ) ; this . _finalizerCallbacks . reset ( ) ; Marionette . triggerMethod . call ( this , "stop" ) ; }
Stop this module by running its finalizers and then stop all of the sub-modules for this module
Stop this module by running its finalizers and then stop all of the sub - modules for this module