code: func (db *DB) Close() error {
  	db.mu.Lock()
  	defer db.mu.Unlock()
  	if db.closed {
  		return ErrDatabaseClosed
  	}
  	db.closed = true
  	if db.persist {
  		db.file.Sync() // do a sync but ignore the error
  		if err := db.file.Close(); err != nil {
  			return err
  		}
  	}
  	// Let's release all references to nil. This will help both with debugging
  	// late usage panics and it provides a hint to the garbage collector
  	db.keys, db.exps, db.idxs, db.file = nil, nil, nil, nil
  	return nil
  }
docs: // Close releases all database resources.
  // All transactions must be closed before closing the database.