code: func (s *session) close() {
  	s.tops.close()
  	if s.manifest != nil {
  		s.manifest.Close()
  	}
  	if s.manifestWriter != nil {
  		s.manifestWriter.Close()
  	}
  	s.manifest = nil
  	s.manifestWriter = nil
  	s.setVersion(nil, &version{s: s, closing: true, id: s.ntVersionId})
  
  	// Close all background goroutines
  	close(s.closeC)
  	s.closeW.Wait()
  }
docs: // Close session.