Closes all not current windows. Useful for tests - after each test you
        can automatically close all windows.
776605
def close_other_windows(self):
        
        main_window_handle = self.current_window_handle
        for window_handle in self.window_handles:
            if window_handle == main_window_handle:
                continue
            self.switch_to_window(window_handle)
            self.close()
        self.switch_to_window(main_window_handle)
149564
def close_active_window(self):
        
        active_split = self._get_active_split()

        # First remove the active window from its split.
        index = active_split.index(self.active_window)
        del active_split[index]

        # Move focus.
        if len(active_split):
            new_active_window = active_split[max(0, index - 1)]
            while isinstance(new_active_window, (HSplit, VSplit)):
                new_active_window = new_active_window[0]
            self.active_window = new_active_window
        else:
            self.active_window = None  # No windows left.

        # When there is exactly on item left, move this back into the parent
        # split. (We don't want to keep a split with one item around -- exept
        # for the root.)
        if len(active_split) == 1 and active_split != self.root:
            parent = self._get_split_parent(active_split)
            index = parent.index(active_split)
            parent[index] = active_split[0]
1223196
public void retireWindow(W window) throws Exception {
		this.mapping.remove(window);
		boolean removed = this.sortedWindows.remove(window);
		if (!removed) {
			throw new IllegalStateException("Window " + window + " is not in in-flight window set.");
		}
	}
714231
public boolean close() {
        for (Iterator<PageComponent> iter = new HashSet<PageComponent>(pageComponents).iterator(); iter.hasNext();) {
            PageComponent component = iter.next();
            if (!close(component))
                return false;
        }
        return true;
    }
168612
def terminate_all(wait=False):
        
        for instance in Process.instances:
            if instance.is_running():
                instance.terminate(wait)
371561
def kill_window(pymux, variables):
    "  "
    for pane in pymux.arrangement.get_active_window().panes:
        pymux.kill_pane(pane)
400165
def closePanel(self):
        
        # make sure we can close all the widgets in the view first
        for i in range(self.count()):
            if not self.widget(i).canClose():
                return False

        container = self.parentWidget()
        viewWidget = self.viewWidget()

        # close all the child views
        for i in xrange(self.count() - 1, -1, -1):
            self.widget(i).close()

        self.tabBar().clear()

        if isinstance(container, XSplitter):
            parent_container = container.parentWidget()
            
            if container.count() == 2:
                if isinstance(parent_container, XSplitter):
                    sizes = parent_container.sizes()
                    widget = container.widget(int(not container.indexOf(self)))
                    index = parent_container.indexOf(container)
                    parent_container.insertWidget(index, widget)
                    
                    container.setParent(None)
                    container.close()
                    container.deleteLater()
                    
                    parent_container.setSizes(sizes)
                
                elif parent_container.parentWidget() == viewWidget:
                    widget = container.widget(int(not container.indexOf(self)))
                    widget.setParent(viewWidget)
                    
                    if projexui.QT_WRAPPER == 'PySide':
                        _ = viewWidget.takeWidget()
                    else:
                        old_widget = viewWidget.widget()
                        old_widget.setParent(None)
                        old_widget.close()
                        old_widget.deleteLater()
                        QtGui.QApplication.instance().processEvents()
                    
                    viewWidget.setWidget(widget)
            else:
                container.setParent(None)
                container.close()
                container.deleteLater()
        else:
            self.setFocus()

        self._hintLabel.setText(self.hint())
        self._hintLabel.show()

        return True
111513
def closeView(self, view=None):
        
        if type(view) == int:
            view = self.widget(view)
        elif view == None:
            view = self.currentView()
        
        index = self.indexOf(view)
        if index == -1:
            return False
        
        # close the view
        count = self.count()
        if count == 1:
            self.closePanel()
        else:
            view.close()

        return True
446623
public static void closeWindow(Component component) {

        Window window = getWindow(component);
        if (window != null) {
            window.close();
        }
    }
1024712
public  void close() {
		super.clear();
		if (indexMap != null){
			indexMap.clear();
			indexMap = null;
		}
		if (this.indexStore != null){
			getIndexStore().close();
			this.indexStore = null ;
		}
		if (this.cacheStore != null){
			getCacheStore().close();
			this.cacheStore = null ;
		}
	}
1216703
def close(self):
        '''
        
        '''
        if self._closing:
            return
        self._closing = True
        for stream in self.streams:
            stream.close()
        self.streams.clear()
        if hasattr(self.sock, 'close'):
            self.sock.close()
1040543
private function closeAndAttemptToCleanupAllFiles()
    {
        // close the writer, which should remove all temp files
        $this->close();

        // remove output file if it was created
        if ($this->globalFunctionsHelper->file_exists($this->outputFilePath)) {
            $outputFolderPath = dirname($this->outputFilePath);
            $fileSystemHelper = new FileSystemHelper($outputFolderPath);
            $fileSystemHelper->deleteFile($this->outputFilePath);
        }
    }
838085
def close(self):
        
        if hasattr(self, "_browser"):
            self.loop.run_until_complete(self._browser.close())
        super().close()
1262985
public void closeWindow(boolean keepFrame) {

        if (m_window != null) {
            m_keepFrameOnClose = keepFrame;
            m_window.close();
            m_window = null;
        }
    }
1354297
@Override
  public void close()
  {
    super.close();
    facts.clear();
    indexAndOffsets.clear();

    if (selectors != null) {
      selectors.clear();
    }

    Closer c = Closer.create();
    aggBuffers.forEach(c::register);
    try {
      c.close();
    }
    catch (IOException e) {
      throw new RuntimeException(e);
    }
    aggBuffers.clear();
  }
686510
function () {
            var subWindow = this._subWindow;
            if (subWindow) {
                this._subWindow = null;
                if (!subWindow.closed) {
                    if (this._rootTplCtxtRef) {
                        this._rootTplCtxtRef.$dispose();
                    }
                    if (this._moduleCtrlRef) {
                        this._moduleCtrlRef.$dispose();
                    }
                    subWindow.close();
                }
                this._moduleCtrlRef = null;
                this._rootTplCtxtRef = null;

                ariaUtilsAriaWindow.$unregisterListeners(this);
                ariaUtilsAriaWindow.detachWindow();

                this.isOpen = false;
            }
        }
192001
def close_window(self):
        """"""
        if self.undocked_window is not None:
            self.undocked_window.close()
            self.undocked_window = None

            # Oddly, these actions can appear disabled after the Dock
            # action is pressed
            self.undock_action.setDisabled(False)
            self.close_plugin_action.setDisabled(False)