src/application.js
/**
     * Destroy all modules and internal resources
     *
     * There is follow order of application destroy
     * 1. beforeAppDestroy hook of plugins
     * 2. Destroy modules
     *  2.1 beforeModuleDestroy hook of plugins for each module
     *  2.2 destroy method of each module
     * 3. Clearing internal state
     *
     */
Destroy all modules and internal resources
There is follow order of application destroy
1. beforeAppDestroy hook of plugins
2. Destroy modules
2.1 beforeModuleDestroy hook of plugins for each module
2.2 destroy method of each module
3. Clearing internal state
Destroy all modules and internal resources There is follow order of application destroy 1 . beforeAppDestroy hook of plugins 2 . Destroy modules 2 . 1 beforeModuleDestroy hook of plugins for each module 2 . 2 destroy method of each module 3 . Clearing internal state
destroy() {
        this._pluginsManager.beforeAppDestroy(this);
        for (let module of this._modulesOrder) {
            module.destroy();
        }
    }
destroy ( ) { this . _pluginsManager . beforeAppDestroy ( this ) ; for ( let module of this . _modulesOrder ) { module . destroy ( ) ; } }
Destroy all modules and internal resources
 There is follow order of application destroy
 1. beforeAppDestroy hook of plugins
 2.
Destroy all modules and internal resources There is follow order of application destroy 1 . beforeAppDestroy hook of plugins 2 .