// Close closes the TPM object.
190027
func (tpm *TPM) Close() error {
	err := tspiError(C.Tspi_Context_CloseObject(tpm.context, tpm.handle))
	return err
}
872916
func (t *File) Close() error {
	if t.fh == nil {
		return nil
	}
	return t.fh.Close()
}
185167
func (p *Pool) Close() {
	p.lock.Lock()
	if p.closeCond != nil {
		p.lock.Unlock()
		return
	}

	p.closeCond = sync2.NewLockCond(nil)
	if len(p.jobs) != 0 {
		p.lock.Unlock()
		p.closeCond.Wait()
	} else {
		p.lock.Unlock()
	}

	close(p.jobs)
}
923976
func (tm *taskManager) Close() error {
	tm.shutdownOnce.Do(func() {
		close(tm.shutdown)
	})

	<-tm.closed

	return nil
}
39161
func (rwops *RWops) Close() error {
	if rwops != nil && C.RWclose(rwops.cptr()) != 0 {
		return GetError()
	}
	return nil
}
435923
func (e *Engine) Close() error {
	e.mu.RLock()
	if e.closing == nil {
		return nil // Already closed
	}

	close(e.closing)
	e.mu.RUnlock()

	// Wait for any other goroutines to finish.
	e.wg.Wait()

	e.mu.Lock()
	defer e.mu.Unlock()
	e.closing = nil

	var ch closeHelper
	ch.Close(e.engine)
	ch.Close(e.wal)
	ch.Close(e.index)
	ch.Close(e.sfile)
	return ch.Done()
}
666818
func (f *fileCloser) Close() error {
	err := f.f.Close()
	if err != nil {
		return fmt.Errorf(
			"Could not close file %v: %v",
			f.path,
			err,
		)
	}
	return nil
}
148264
func (stmt *OCI8Stmt) Close() error {
	if stmt.closed {
		return nil
	}
	stmt.closed = true

	C.OCIHandleFree(unsafe.Pointer(stmt.stmt), C.OCI_HTYPE_STMT)

	stmt.stmt = nil
	stmt.pbind = nil

	return nil
}
546770
func Close(c Closer) {
	if err := c.Close(); err != nil {
		log.Warnf("failed to close %v: %v", c, err)
	}
}
666338
func (t *File) Close() error {
	t.closed = true
	return t.file.Close()
}
1354921
func (m *qlbStmt) Close() error {
	if m.job != nil {
		m.job.Close()
	}
	return nil
}
641050
func (s *syncLogStore) Close() error {
	s.mu.Lock()
	defer s.mu.Unlock()
	return s.store.Close()
}
311618
func (m *Memory) Close() error {
	m.cancel()
	m.Lock()
	defer m.Unlock()
	m.buf.Close()
	return nil
}
238281
func (r *RemoveDirCloser) Close() error {
	return trace.ConvertSystemError(os.RemoveAll(r.Path))
}
310214
func (s *Stmt) Close() error {
	s.closemu.Lock()
	defer s.closemu.Unlock()

	if s.stickyErr != nil {
		return s.stickyErr
	}
	s.mu.Lock()
	if s.closed {
		s.mu.Unlock()
		return nil
	}
	s.closed = true

	if s.tx != nil {
		s.txsi.Close()
		s.mu.Unlock()
		return nil
	}
	s.mu.Unlock()

	return s.db.removeDep(s, s)
}
920571
func (itr *blocksItr) Close() {
	itr.mgr.cpInfoCond.L.Lock()
	defer itr.mgr.cpInfoCond.L.Unlock()
	itr.closeMarkerLock.Lock()
	defer itr.closeMarkerLock.Unlock()
	itr.closeMarker = true
	itr.mgr.cpInfoCond.Broadcast()
	if itr.stream != nil {
		itr.stream.close()
	}
}
852750
func (am *Manager) Close() error {
	errc := make(chan error)
	am.quit <- errc
	return <-errc
}