Closes the GATT device and cleans up.

@param gatt the GATT device to be closed.
771983
protected void close(final BluetoothGatt gatt) {
		logi("Cleaning up...");
		sendLogBroadcast(LOG_LEVEL_DEBUG, "gatt.close()");
		gatt.close();
		mConnectionState = STATE_CLOSED;
	}
1198261
void close() {
        final String methodName = "close";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, methodName);
        }

        close(false);

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, methodName);
        }
    }
699411
@Override
    public void close()
            throws IOException
    {
        if (closed) {
            return;
        }
        try {
            flush();
            out.close();
        }
        finally {
            closed = true;
            inputBufferAllocator.release(inputBuffer);
            outputBufferAllocator.release(outputBuffer);
            inputBuffer = null;
            outputBuffer = null;
        }
    }
449583
@Override
    public void close() {
        if (isClosed) {
            return;
        }

        TransactionOLTP localTx = localOLTPTransactionContainer.get();
        if (localTx != null) {
            localTx.close(ErrorMessage.SESSION_CLOSED.getMessage(keyspace()));
            localOLTPTransactionContainer.set(null);
        }

        if (this.onClose != null) {
            this.onClose.accept(this);
        }

        isClosed = true;
    }
825488
def close(self):
        '''
        '''
        try:
            self.dut.close()
        except Exception:
            logging.warning('Closing DUT was not successful')
        else:
            logging.debug('Closed DUT')
472109
@Override
  public void close() throws IOException {
    if (mIn != null) {
      mIn.close();
    }

    if (mOut != null) {
      mOut.close();
    }
    mOffset = -1;
  }
81020
public synchronized void close() {
        if (!closed && channel != null) {
            ConnectionWatchdog watchdog = channel.getPipeline().get(ConnectionWatchdog.class);
            watchdog.setReconnect(false);
            closed = true;
            channel.close();
        }
    }
565589
void close() {

        final String methodName = "close";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, methodName);
        }

        /*
         * Cancel any ongoing dispatch
         */
        _cancelled = true;

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, methodName);
        }

    }
671233
private static void finalClose(final Closeable closeMe) {
        if (closeMe != null) {
            try {
                closeMe.close();
            } catch (IOException iox) {
                LOG.log(Level.FINEST, "Could not close: " + closeMe, iox);
            }
        }
    }
894069
public void close() {
    if (lock != null) {
      lock.lock();
    }
    this.connected = false;
    try {
      /* If a streaming result set is open, close it.*/
      skip();
    } catch (Exception e) {
      /* eat exception */
    }

    SendClosePacket.send(writer);
    closeSocket(reader, writer, socket);
    cleanMemory();
    if (lock != null) {
      lock.unlock();
    }
  }
417086
public void close() {
        readyState = ReadyState.CLOSING;

        try {
            webSocketSession.close(new CloseReason(CloseReason.CloseCodes.NORMAL_CLOSURE, null));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
668528
public void close()
  {
    synchronized (this) {
      if (_state == State.CLOSED)
        return;

      _state = State.CLOSED;
    }

    synchronized (this) {
      _idleHead = _idleTail = 0;
    }

    for (int i = 0; i < _idle.length; i++) {
      ClientSocket stream;

      synchronized (this) {
        stream = _idle[i];
        _idle[i] = null;
      }

      if (stream != null)
        stream.closeImpl();
    }
  }
867723
public void destroy() {
        try {
            ctx.close();
        }
        catch (javax.naming.NamingException e) {
            LOG.warn("Error when closing", e);
        }
    }
952744
@Override
    public void close() {
        target.kill();
        try {
            thread.join();
            target.consoleStream.print("\n");
            target.consoleStream.flush();
            target.terminal.close();
        }
        catch (InterruptedException | IOException ignored) { }
    }
66163
public void close() throws IOException
  {
    if (isClosed)
    {
      throw new IOException("Telemetry connector is closed");
    }
    try
    {
      this.sendBatch();
    }
    catch (IOException e)
    {
      logger.error("Send logs failed on closing", e);
    }
    finally
    {
      this.isClosed = true;
    }
  }
89549
protected function close()
    {
        if ($this->input !== false) {
            fclose($this->input);
        }
        if ($this->output !== false) {
            fclose($this->output);
        }
    }
33269
@Override
    public void close() throws IOException
    {
        if (out != null)
        {
            out.close();
            out = null;
        }
        if (in != null)
        {
            in.close();
            in = null;
        }
    }