/* (non-Javadoc)
@see com.lowagie.text.rtf.direct.RtfDestination#closeDestination()
506785
public boolean closeDestination() {
		if(this.rtfParser.isImport()) {
			if(this.buffer.length()>0) {
				writeBuffer();
			}
		}
		
		this.rtfParser.getState().properties.removeRtfPropertyListener(this);

		return true;
	}
600947
public CompletableFuture<Void> close() {
    threadContext.close();
    if (closeOnStop) {
      threadContextFactory.close();
    }
    return CompletableFuture.completedFuture(null);
  }
355447
@Override
    public void close() {
        if (!this.closed) {
            this.closed = true;

            // If we have already returned a result but it hasn't been consumed yet, cancel it.
            CompletableFuture<ReadResultEntryContents> lastReturnedFuture = this.lastEntryFuture;
            if (lastReturnedFuture != null && !lastReturnedFuture.isDone()) {
                lastReturnedFuture.cancel(true);
                this.lastEntryFuture = null;
            }

            log.trace("{}.ReadResult[{}]: Closed.", this.traceObjectId, this.streamSegmentStartOffset);
        }
    }
46308
public final <T extends ReleasableInputStream> T disableClose() {
        this.closeDisabled = true;
        @SuppressWarnings("unchecked")
        T t = (T)this;
        return t;
    }
119080
public void close() throws IOException {
        if (!closed) {
            finish();
            if (usesDefaultDeflater)
                def.end();
            out.close();
            closed = true;
        }
    }
59868
public synchronized void close(final boolean forceClose) throws SQLException {
        Collection<SQLException> exceptions = new LinkedList<>();
        MasterVisitedManager.clear();
        exceptions.addAll(closeResultSets());
        exceptions.addAll(closeStatements());
        if (!stateHandler.isInTransaction() || forceClose) {
            exceptions.addAll(releaseConnections(forceClose));
        }
        stateHandler.doNotifyIfNecessary();
        throwSQLExceptionIfNecessary(exceptions);
    }
1247684
public function finalize(): void
    {
        if ($this->currentAnnotation !== null) {
            if ($this->currentAnnotationContent === null) {
                $this->parsedAnnotations[] = $this->currentAnnotation;
            } else {
                throw new AnnotationParseException(
                    'An annotation content is not closed (you probably forget to close a parenthesis or a quote)'
                );
            }
        }
    }
1042857
protected void physicalCloseNotification() {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "physicalCloseNotification");
      synchronized(connectionClosedLock) {
         connectionClosed = true;
      }
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "physicalCloseNotification");
   }
1274758
public void closeDrawer() {
        if (drawerLayout != null) {
            if (drawerGravity != 0) {
                drawerLayout.closeDrawer(drawerGravity);
            } else {
                drawerLayout.closeDrawer(sliderLayout);
            }
        }
    }
1267049
public void afterConnectionClosed(WebSocketSession session, CloseStatus status) {
        logger.debug("WebSocket closed: {}, Close Status: {}", session, status.toString());
    }
691072
@Trivial
    private void stateClosed() {
        rollingWindow.clear();
        state.set(State.CLOSED);
        metricRecorder.reportCircuitClosed();
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Transitioned to Closed state");
        }
    }
851819
@Override
	public final void setJMSDestination(Destination destination) throws JMSException
    {
    	assertDeserializationLevel(MessageSerializationLevel.FULL);
        this.destination = DestinationTools.asRef(destination);
    }
971870
public static void closeStatement(Statement st){
		if (st != null) {
			try {
				st.close();
			} catch (Exception e) {
				log.warn("Exception when closing database statement.", e);
			}
		}
	}
1253619
@Override
    public void close(boolean forceRealClose) throws IOException
    {
        flush();
        mTextWriter = null;
        mAttrValueWriter = null;

        // Buffers to free?
        char[] buf = mOutputBuffer;
        if (buf != null) {
            mOutputBuffer = null;
            mConfig.freeFullCBuffer(buf);
        }
        // Plus may need to close the actual writer
        if (forceRealClose || mAutoCloseOutput) {
            /* 14-Nov-2008, TSa: To resolve [WSTX-163], need to have a way
             *   to force UTF8Writer to close the underlying stream...
             */
            if (mOut instanceof CompletelyCloseable) {
                ((CompletelyCloseable)mOut).closeCompletely();
            } else {
                mOut.close();
            }
        }
    }
1110815
@Override
  public synchronized void close() throws Exception {
    if (this.readerWriter != null && !this.writerClosed) {
      this.readerWriter.close();
      this.writerClosed = true;
    }
  }
539024
@Override
    public void afterConnectionClosed(final WebSocketSession webSocketSession, final CloseStatus status) {
        logger.debug("[afterConnectionClosed] id = ", webSocketSession.getId());
        this.session = null;

        if (connectionListener != null) {
            connectionListener.onConnectionClosed();
        }
    }
1156330
@Override
  public void close() {
    LOG.info("Closing " + this.getClass().getSimpleName());
    try (Connection conn = createConnection()) {
      JdbcWriterCommands commands = createJdbcWriterCommands(conn);
      if (!this.createdStagingTables.isEmpty()) {
        for (String stagingTable : this.createdStagingTables) {
          LOG.info("Dropping staging table " + this.createdStagingTables);
          commands.drop(database, stagingTable);
        }
      }

      if (this.userCreatedStagingTable != null) {
        LOG.info("Truncating staging table " + this.userCreatedStagingTable);
        commands.truncate(database, this.userCreatedStagingTable);
      }
    } catch (SQLException e) {
      throw new RuntimeException("Failed to close", e);
    }
  }