Avoid to close it but rather release itself to the owner pool.
973030
@Override
  public void close() {
    if (isClosed())
      return;

    objects2Records.clear();
    records2Objects.clear();
    rid2Records.clear();

    checkOpeness();
    rollback();

    getMetadata().close();
    ((ODatabaseRaw) ((ODatabaseRecord) underlying.getUnderlying()).getUnderlying()).callOnCloseListeners();
    getLevel1Cache().clear();

    ownerPool.release(this);
    ownerPool = null;
  }
965744
def Close(self):
    
    if self.locked and self.CheckLease() == 0:
      raise LockError("Can not update lease that has already expired.")

    self._WriteAttributes()

    # Releasing this lock allows another thread to own it.
    if self.locked:
      self.transaction.Release()

    if self.parent:
      self.parent.Close()

    # Interacting with a closed object is a bug. We need to catch this ASAP so
    # we remove all mode permissions from this object.
    self.mode = ""
244695
async def close(self) -> None:
        

        LOGGER.debug('NodePool.close >>>')

        if not self.handle:
            LOGGER.warning('Abstaining from closing pool %s: already closed', self.name)
        else:
            await pool.close_pool_ledger(self.handle)
        self._handle = None

        LOGGER.debug('NodePool.close <<<')
559708
def close(self):
        ""
        if self.stream:
            self.stream.close(self.scheduler)
            self.stream = None
840236
def release(self):
		
		if self._locked is True:
			self._locked = False
			self._lock.release()
1176617
def close(self):
        """"""
        # Instead of actually closing the connection,
        # return it to the pool so it can be reused.
        if self._con is not None:
            self._pool.returnConnection(self._con)
            self._con = None
1215624
def close(self):
    """"""
    self.acquire()
    try:
      self.flush()
      try:
        # Do not close the stream if it's sys.stderr|stdout. They may be
        # redirected or overridden to files, which should be managed by users
        # explicitly.
        if self.stream not in (sys.stderr, sys.stdout) and (
            not hasattr(self.stream, 'isatty') or not self.stream.isatty()):
          self.stream.close()
      except ValueError:
        # A ValueError is thrown if we try to run isatty() on a closed file.
        pass
      super(PythonHandler, self).close()
    finally:
      self.release()
225187
def close(self):
        
        if not self._closed:
            self._closed = True
            if self._pool is not None:
                self._pool.close()
                self._pool = None
1256436
def release(self, conn):
        """"""
        if conn.in_transaction:
            raise InvalidRequestError(
                "Cannot release a connection with "
                "not finished transaction"
            )
        raw = conn.connection
        res = yield from self._pool.release(raw)
        return res
495321
def close(self):
        
        super(LockingDatabase, self).close()
        if not self.readonly:
            self.release_lock()
986096
def close(self):
        """"""

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

        self.hwman.close()
        self.opened = False
798101
def close(self):
        """"""

        # remove callbacks
        DatastoreLegacy.datastores[self.domain].remove(self)

        # delete data after the last instance is gone
        if self.release_storage and \
           not DatastoreLegacy.datastores[self.domain]:
            del DatastoreLegacy.store[self.domain]

        del self
1046718
static void closeQuietly(Connection ps)
    {
        if (ps != null)
        {
            try
            {
                ps.close();
            }
            catch (Exception e)
            {
                jqmlogger.warn("Could not close a DB connection - possible pool leak", e);
            }
        }
    }
1117472
def release(self):
        """"""
        if not self.acquired:
            raise threading.ThreadError("Unable to release an unacquired"
                                        " lock")
        try:
            self.unlock()
        except IOError:
            self.logger.exception("Could not unlock the acquired lock opened"
                                  " on `%s`", self.path)
        else:
            self.acquired = False
            try:
                self._do_close()
            except IOError:
                self.logger.exception("Could not close the file handle"
                                      " opened on `%s`", self.path)
            else:
                self.logger.log(_utils.BLATHER,
                                "Unlocked and closed file lock open on"
                                " `%s`", self.path)
1073739
def release(self):
        """"""
        with self._lock:
            if not self._locked:
                raise RuntimeError('lock not currently held')
            elif self._reentrant and self._owner is not fibers.current():
                raise RuntimeError('lock not owned by this fiber')
            self._release()
349761
def release_accounts(self, owner):
        
        for _, pool in self.pools:
            pool.release_accounts(owner)
        self.default_pool.release_accounts(owner)
798217
def release(self, connection: Connection):
        '''
        '''
        assert not self._closed

        key = connection.key
        host_pool = self._host_pools[key]

        _logger.debug('Check in %s', key)

        yield from host_pool.release(connection)

        force = self.count() > self._max_count
        yield from self.clean(force=force)