/*	close() only needs to be called if you are worried about using too much memory while your script
is running. All associated result memory for the specified result identifier will automatically be freed.
334335
function _close()
	{
		if(is_object($this->_queryID)) {
			$rez = sqlsrv_free_stmt($this->_queryID);
			$this->_queryID = false;
			return $rez;
		}
		return true;
	}
81287
static void closeQuietly(ResultSet ps)
    {
        if (ps != null)
        {
            try
            {
                ps.getStatement().close();
                // ps.close();
            }
            catch (Exception e)
            {
                // Should go with the connection anyway.
                // jqmlogger.warn("Could not close a DB result set - possible pool leak", e);
            }
        }
    }
375922
public function closeConnection()
    {
        // release statement and close connection(s)
        $this->last_result = null;
        foreach ($this->dbhs as $dbh) {
            oci_close($dbh);
        }

        parent::closeConnection();
    }
333773
void _close()
                    throws SIResourceException, SIConnectionLostException,
                    SIErrorException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "_close");

        try
        {
            //close the LCP
            _localConsumerPoint.close();
        } catch (SINotPossibleInCurrentConfigurationException e)
        {
            // No FFDC code needed

            //Do nothing ... probably means that the Destination is being deleted
            //and so the LCP will be closed anyway
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(tc, "_close", e);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "_close");
    }
595880
@Override
	public void close() {
		Iterator<Map.Entry<Path, OpenCryptoFile>> iter = openCryptoFiles.entrySet().iterator();
		while (iter.hasNext()) {
			Map.Entry<Path, OpenCryptoFile> entry = iter.next();
			iter.remove(); // remove before invoking close() to avoid concurrent modification of this iterator by #close(OpenCryptoFile)
			entry.getValue().close();
		}
	}
89549
protected function close()
    {
        if ($this->input !== false) {
            fclose($this->input);
        }
        if ($this->output !== false) {
            fclose($this->output);
        }
    }
1003411
@Override
    public void close() {
        namedParamSqlCache.clear();
        namedParamIndexPropCache.clear();
        clearStatementCache();
        if (useConnection != null) {
            try {
                useConnection.close();
            } catch (SQLException e) {
                LOG.finest("Caught exception closing connection: " + e.getMessage());
            }
        }
    }
867931
protected function freeResult()
	{
		if (!empty($this->cursor) && $this->cursor instanceof \PDOStatement)
		{
			$this->cursor->closeCursor();
		}
	}
1139309
@Override
	public void close() {
		executor.shutdown();
		for (SelectionKey key : selector.keys()) {
			((Attachment) key.attachment()).finishClose();
		}
		try {
			selector.close();
		} catch (IOException e) {/**/}
	}
270336
@Override
  public void close() throws IOException {
    if (currentOffset < dataLength) {
      byte[] t = new byte[Math.min((int)
            (Integer.MAX_VALUE & (dataLength - currentOffset)), 32 * 1024)];
      while (currentOffset < dataLength) {
        int n = read(t, 0, t.length);
        if (0 == n) {
          throw new EOFException("Could not validate checksum");
        }
      }
    }
    in.close();
  }
867723
public void destroy() {
        try {
            ctx.close();
        }
        catch (javax.naming.NamingException e) {
            LOG.warn("Error when closing", e);
        }
    }
417086
public void close() {
        readyState = ReadyState.CLOSING;

        try {
            webSocketSession.close(new CloseReason(CloseReason.CloseCodes.NORMAL_CLOSURE, null));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
1277452
public void close(Result<Boolean> result)
  {
    _lifecycle.toDestroy();
    
    SegmentStream nodeStream = _nodeStream;
    _nodeStream = null;
      
    if (nodeStream != null) {
      nodeStream.closeFsync(result.then(v->closeImpl()));
    }
    else {
      result.ok(true);
    }
  }
1189756
@Override
	public void close() throws IOException {
		try {
			resultSet.close();
		} catch (SQLException se) {
			LOG.info("Inputformat couldn't be closed - " + se.getMessage());
		} catch (NullPointerException npe) {
		}
		try {
			statement.close();
		} catch (SQLException se) {
			LOG.info("Inputformat couldn't be closed - " + se.getMessage());
		} catch (NullPointerException npe) {
		}
		try {
			dbConn.close();
		} catch (SQLException se) {
			LOG.info("Inputformat couldn't be closed - " + se.getMessage());
		} catch (NullPointerException npe) {
		}
	}
709386
public void close() throws SQLException {
    if (!closed) {
      // flush any open output streams
      if (os != null) {
        try {
          // we can't call os.close() otherwise we go into an infinite loop!
          os.flush();
        } catch (IOException ioe) {
          throw new PSQLException("Exception flushing output stream", PSQLState.DATA_ERROR, ioe);
        } finally {
          os = null;
        }
      }

      // finally close
      FastpathArg[] args = new FastpathArg[1];
      args[0] = new FastpathArg(fd);
      fp.fastpath("lo_close", args); // true here as we dont care!!
      closed = true;
      if (this.commitOnClose) {
        this.conn.commit();
      }
    }
  }
1216400
public void close() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "close");
        }

        synchronized (closeSync) {
            if (closeCalled) {
                return;
            }

            closeCalled = true;

            // Release the buffer used to store results of encryption, and given to
            // device channel for writing.
            if (null != this.encryptedAppBuffer) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                    Tr.event(tc, "Releasing ssl output buffer during close. "
                                 + SSLUtils.getBufferTraceInfo(this.encryptedAppBuffer));
                }
                this.encryptedAppBuffer.release();
                this.encryptedAppBuffer = null;
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "close");
        }
    }
1176222
protected synchronized void close() {

        this.closed = true;

        setReadable(false);
        setWritable(false);
        freeOutputStream();
        freeInputStream();

        this.gzdata = null;
    }