code: function tearDownPage() {
           visibilityManager.unsubscribe();
           localeManager.unsubscribe();
  
           publishDebugInfo( 'willUnload.page', { page: activePage } );
  
           return eventBus
              .publishAndGatherReplies( 'endLifecycleRequest.default', LIFECYCLE_EVENT, EVENT_OPTIONS )
              .then( () => {
                 const pageName = activePage;
                 activeWidgetAdapterWrappers.forEach( wrapper => wrapper.destroy() );
                 activeWidgetAdapterWrappers = [];
                 activePage = null;
  
                 publishDebugInfo( 'didUnload.page', { page: pageName } );
                 cleanUpLayout();
                 cleanUpLayout = () => {};
              } );
        }
docs: //////////////////////////////////////////////////////////////////////////////////////////////////////