code: func (f *LogFile) Close() error {
  	// Wait until the file has no more references.
  	f.wg.Wait()
  
  	if f.w != nil {
  		f.w.Flush()
  		f.w = nil
  	}
  
  	if f.file != nil {
  		f.file.Close()
  		f.file = nil
  	}
  
  	if f.data != nil {
  		mmap.Unmap(f.data)
  	}
  
  	f.mms = make(logMeasurements)
  	return nil
  }
docs: // Close shuts down the file handle and mmap.