Close the handle if opened.
339776
public function releaseHandle()
    {
        if (is_resource($this->handle)) {
            fclose($this->handle);
        }
        $this->handle = null;
    }
323085
def on_open(self, _handle):
        
        self.logger.debug('Connection opened')
        self.handle.add_on_connection_blocked_callback(self.on_blocked)
        self.handle.add_on_connection_unblocked_callback(self.on_unblocked)
        self.handle.add_on_close_callback(self.on_closed)
        self.handle.channel(self.on_channel_open)
452967
def close(self):
        
        if self.handle:
            self.router.del_handler(self.handle)
            self.handle = None
        self._latch.close()
340570
def close(self):
        ''''''
        if self._call_later_handle:
            self._call_later_handle.cancel()

        self._running = False
996045
def close(self):
        """"""
        windll.kernel32.CloseHandle(self.conout_pipe)
        windll.kernel32.CloseHandle(self.conin_pipe)
5482
def closeEvent(self, event):
        """"""
        if self.closing(True):
            event.accept()
        else:
            event.ignore()
1149734
protected function closeHandle()
    {
        $handle = $this->getHandle();
        fclose($handle);
        $this->_handle = false;

        $this->runCommand($this->getFileName());
    }
89869
def on_close_shortcut(self, *args):
        """"""
        state_machine_m = self.model.get_selected_state_machine_model()
        if state_machine_m is None:
            return
        self.on_close_clicked(None, state_machine_m, None, force=False)
972936
protected void close() {

        if (m_dialog != null) {
            m_dialog.hide();
            m_dialog = null;
            m_editorHandler.onClose(m_editableData.getSitePath(), m_editableData.getStructureId(), m_isNew, false);
            m_editorHandler = null;
        }
        if (m_form != null) {
            m_form.removeFromParent();
            m_form = null;
        }
        if (m_closingHandlerRegistration != null) {
            m_closingHandlerRegistration.removeHandler();
            m_closingHandlerRegistration = null;
        }
    }
142247
void closeHandle(HelloWorldConnection handle)
   {
      connections.remove((HelloWorldConnectionImpl)handle);

      ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
      event.setConnectionHandle(handle);

      for (ConnectionEventListener cel : listeners)
      {
         cel.connectionClosed(event);
      }
   }
39254
def close(self):
        '''
        '''
        if self.closed: return
        for func,arglist in self.callbacks:
            apply(func, arglist)
        self.closed = True
1353002
def close(self):
        """"""
        if self._mpoll is None:
            return
        for mpoll in self._mpoll.values():
            mpoll.close()
        self._mpoll.clear()
        self._mpoll = None
1280923
def close(self):
        """"""
        if 'isLive' in self.__dict__ and self.isLive:
            self.transport.close()
            self.isLive = False
986096
def close(self):
        """"""

        if self.hwman.stream.connected:
            self.hwman.disconnect()

        self.hwman.close()
        self.opened = False
335097
static void close(LedgerHandle handle) throws DurableDataLogException {
        try {
            Exceptions.handleInterrupted(handle::close);
        } catch (BKException bkEx) {
            throw new DurableDataLogException(String.format("Unable to close ledger %d.", handle.getId()), bkEx);
        }
    }
823667
def do_close(self, reason):
        """"""
        if self.closed:
            return
        self.closed = True
        self.reason = reason
        self.incoming.close()
        self.responses.close()
        if not self._closing:
            self.client.channel_failed(self, Failure(reason))
1161891
function(){
    if (this.isClosed) { return; }

    // allow the close to be stopped by returning `false`
    // from the `onBeforeClose` method
    var shouldClose = this.triggerMethod("before:close");
    if (shouldClose === false){
      return;
    }

    // mark as closed before doing the actual close, to
    // prevent infinite loops within "close" event handlers
    // that are trying to close other views
    this.isClosed = true;
    this.triggerMethod("close");

    // unbind UI elements
    this.unbindUIElements();

    // remove the view from the DOM
    this.remove();
  }