Destroys desired page

        Disconnects the page from signals and removes interconnection to parent-controller or observables.

        :param tab_dict: Tab-dictionary that holds all necessary information of a page and state-editor.
183198
def destroy_page(self, tab_dict):
        
        # logger.info("destroy page %s" % tab_dict['controller'].model.state.get_path())
        if tab_dict['source_code_changed_handler_id'] is not None:
            handler_id = tab_dict['source_code_changed_handler_id']
            if tab_dict['controller'].view.source_view.get_buffer().handler_is_connected(handler_id):
                tab_dict['controller'].view.source_view.get_buffer().disconnect(handler_id)
            else:
                logger.warning("Source code changed handler of state {0} was already removed.".format(tab_dict['state_m']))
        self.remove_controller(tab_dict['controller'])
405254
def close_tab(self, *args):
        
        prompt_cfg = self.settings.general.get_int('prompt-on-close-tab')
        self.get_notebook().delete_page_current(prompt=prompt_cfg)
1289060
def delete(self):
        

        es = connections.get_connection(self._using)

        return AttrDict(
            es.delete_by_query(
                index=self._index,
                body=self.to_dict(),
                **self._params
            )
        )
1246988
def remove_page(self, process_id, wit_ref_name, page_id):
        
        route_values = {}
        if process_id is not None:
            route_values['processId'] = self._serialize.url('process_id', process_id, 'str')
        if wit_ref_name is not None:
            route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str')
        if page_id is not None:
            route_values['pageId'] = self._serialize.url('page_id', page_id, 'str')
        self._send(http_method='DELETE',
                   location_id='1cc7b29f-6697-4d9d-b0a1-2650d3e1d584',
                   version='5.0-preview.1',
                   route_values=route_values)
1016817
public void onRemoveTab(final AjaxRequestTarget target, final T tab)
	{
		final int index = getTabs().indexOf(tab);
		if (0 <= index)
		{
			onRemoveTab(target, index);
		}
	}
151864
async def teardown_conn(self, context):
        """"""

        client_id = context.user_data

        self._logger.info("Tearing down client connection: %s", client_id)
        if client_id not in self.clients:
            self._logger.warning("client_id %s did not exist in teardown_conn", client_id)
        else:
            del self.clients[client_id]
845972
async def disconnect(self, conn_id):
        

        resp = await self._execute(self._adapter.disconnect_sync, conn_id)
        _raise_error(conn_id, 'disconnect', resp)
        self._teardown_connection(conn_id, force=True)
340082
def disconnecting_interfaces(self, interfaces, **kwargs):
        

        url = 'api/v3/connections/' + str(interfaces[0]) + '/' + str(interfaces[1]) + '/'

        return super(ApiInterfaceRequest, self).delete(self.prepare_url(url, kwargs))
1163992
def removePage(self, pageId):
        
        try:
            self._pages[pageId].deleteLater()
            del self._pages[pageId]
        except KeyError:
            pass
1280238
public void onRemoveTab(final AjaxRequestTarget target, final int index)
	{
		final int tabSize = getTabs().size();
		// there have to be at least one tab on the ajaxTabbedPanel...
		if ((2 <= tabSize) && (index < tabSize))
		{
			setSelectedTab(index);
			getTabs().remove(index);
			target.add(this);
		}
	}
741584
function (target) {
		var tab = this.resolveTab(target,'removeTab');
		var tabData = {
			index:   tab.tabIndex,
			caption: tab.content,
			tooltipMsg: tab.tooltipMsg,
			userId:  tab.userId,
			data:    tab.userData
		} ;
		var that = this ;
		if (tab) {
			tabData.next = function (err) {
				if (err) { throw new Error(err);   }
				else     { that.removeTab(target); }
			} ;
			this.doTabRemoveRequested( tabData ) ;
		}
	}
836160
def connectionLostForKey(self, key):
        
        if key in self.cachedConnections:
            del self.cachedConnections[key]
        if self._shuttingDown and self._shuttingDown.get(key):
            d, self._shuttingDown[key] = self._shuttingDown[key], None
            d.callback(None)
321514
def disconnect(self):
        

        for name, wire in self.wires():
            self.cut(name, disconnect=True)
632315
def close_buffer(self):
        
        eb = self.active_editor_buffer

        # Remove this buffer.
        index = self.editor_buffers.index(eb)
        self.editor_buffers.remove(eb)

        # Close the active window.
        self.active_tab.close_active_window()

        # Close all the windows that still have this buffer open.
        for i, t in enumerate(self.tab_pages[:]):
            t.close_editor_buffer(eb)

            # Remove tab when there are no windows left.
            if t.window_count() == 0:
                self.tab_pages.remove(t)

                if i >= self.active_tab_index:
                    self.active_tab_index = max(0, self.active_tab_index - 1)

        # When there are no windows/tabs left, create a new tab.
        if len(self.tab_pages) == 0:
            self.active_tab_index = None

            if len(self.editor_buffers) > 0:
                # Open the previous buffer.
                new_index = (len(self.editor_buffers) + index - 1) % len(self.editor_buffers)
                eb = self.editor_buffers[new_index]

                # Create a window for this buffer.
                self.tab_pages.append(TabPage(Window(eb)))
                self.active_tab_index = 0
            else:
                # Create a new buffer. (This will also create the window
                # automatically.)
                eb = self._get_or_create_editor_buffer()
1262525
function destroy(self, connections, options, callback) {
  let connectionCount = connections.length;
  function connectionDestroyed() {
    connectionCount--;
    if (connectionCount > 0) {
      return;
    }

    // Zero out all connections
    self.inUseConnections = [];
    self.availableConnections = [];
    self.connectingConnections = 0;

    // Set state to destroyed
    stateTransition(self, DESTROYED);
    if (typeof callback === 'function') {
      callback(null, null);
    }
  }

  if (connectionCount === 0) {
    connectionDestroyed();
    return;
  }

  // Destroy all connections
  connections.forEach(conn => {
    for (var i = 0; i < events.length; i++) {
      conn.removeAllListeners(events[i]);
    }

    conn.destroy(options, connectionDestroyed);
  });
}
1163729
def teardown(self):
        '''
        
        '''
        if self.controller:
            self.controller.teardown()
        for monitor in self.monitors:
            monitor.teardown()
990801
def bring_tab_to_the_top(self, tab_label):
        
        found = False
        for notebook in self.left_bar_notebooks:
            for i in range(notebook.get_n_pages()):
                if gui_helper_label.get_notebook_tab_title(notebook, i) == gui_helper_label.get_widget_title(tab_label):
                    found = True
                    break
            if found:
                notebook.set_current_page(i)
                break