// Reset empties the current space and returns a new Space with the old
// contents. Reset a Space to get an immutable copy suitable for walking.
979540
func (s *Space) Reset() *Space {
	s.mtx.Lock()
	defer s.mtx.Unlock()
	n := NewSpace()
	n.nodes, s.nodes = s.nodes, n.nodes
	return n
}
1026710
func (b *Buffer) Reset() {
	version := b.preOp()
	b.buf.Reset()
	b.postOp(version)
}
1134926
func (e *hashElem) reset() {
	e.key = e.key[:0]
	e.value = nil
	e.hash = 0
}
767441
func (s *Store) Reset() {
	s.mu.Lock()
	s.metrics = make(map[string][]time.Duration)
	s.mu.Unlock()
	s.diffmu.Lock()
	s.diffs = make(map[string]*diff)
	s.diffmu.Unlock()
}
1174057
func (out *RAMOutputStream) Reset() {
	out.currentBuffer = nil
	out.currentBufferIndex = -1
	out.bufferPosition = 0
	out.bufferStart = 0
	out.bufferLength = 0
	out.file.SetLength(0)
	if out.crc != nil {
		out.crc.Reset()
	}
}
790348
func (s *Statistics) reset() {
	s.cycles++
	s.totalMessagesCleared += s.messagesCleared

	s.memoryCleared = 0
	s.messagesCleared = 0
}
1176704
func (c *BigCache) Reset() error {
	for _, shard := range c.shards {
		shard.reset(c.config)
	}
	return nil
}
1263729
func (s *Storage) Reset() {
	setLevelDB(storage.TotalCountKey, 0)
	setLevelDB(storage.IosSuccessKey, 0)
	setLevelDB(storage.IosErrorKey, 0)
	setLevelDB(storage.AndroidSuccessKey, 0)
	setLevelDB(storage.AndroidErrorKey, 0)
}
2862
func (b *Buffer) Reset() {
	b.Line = b.Line[:0]
	b.Val = b.Val[:0]
}
1048721
func (s *Stubs) Reset() {
	for v, originalVal := range s.stubs {
		v.Elem().Set(originalVal)
	}
	s.resetEnv()
}
951833
func (l *L) Reset() *L {
	l.line, l.value = make(chan struct{}), 0
	return l
}
545512
func (r *BitReader) Reset(data []byte) {
	r.data = data
	r.buf.v, r.buf.n = 0, 0
	r.readBuf()
}
36834
func (s *Storage) Reset() {
	s.setBoltDB(storage.TotalCountKey, 0)
	s.setBoltDB(storage.IosSuccessKey, 0)
	s.setBoltDB(storage.IosErrorKey, 0)
	s.setBoltDB(storage.AndroidSuccessKey, 0)
	s.setBoltDB(storage.AndroidErrorKey, 0)
}
502563
func (b *Bytes) Reset() {
	b.fixed.reset()
	b.bytes = b.fixed
}
1306241
func (s *Snmp) Reset() {
	atomic.StoreUint64(&s.BytesSent, 0)
	atomic.StoreUint64(&s.BytesReceived, 0)
	atomic.StoreUint64(&s.MaxConn, 0)
	atomic.StoreUint64(&s.ActiveOpens, 0)
	atomic.StoreUint64(&s.PassiveOpens, 0)
	atomic.StoreUint64(&s.CurrEstab, 0)
	atomic.StoreUint64(&s.InErrs, 0)
	atomic.StoreUint64(&s.InCsumErrors, 0)
	atomic.StoreUint64(&s.KCPInErrors, 0)
	atomic.StoreUint64(&s.InPkts, 0)
	atomic.StoreUint64(&s.OutPkts, 0)
	atomic.StoreUint64(&s.InSegs, 0)
	atomic.StoreUint64(&s.OutSegs, 0)
	atomic.StoreUint64(&s.InBytes, 0)
	atomic.StoreUint64(&s.OutBytes, 0)
	atomic.StoreUint64(&s.RetransSegs, 0)
	atomic.StoreUint64(&s.FastRetransSegs, 0)
	atomic.StoreUint64(&s.EarlyRetransSegs, 0)
	atomic.StoreUint64(&s.LostSegs, 0)
	atomic.StoreUint64(&s.RepeatSegs, 0)
	atomic.StoreUint64(&s.FECParityShards, 0)
	atomic.StoreUint64(&s.FECErrs, 0)
	atomic.StoreUint64(&s.FECRecovered, 0)
	atomic.StoreUint64(&s.FECShortShards, 0)
}
1143428
func (c *Cache) Reset() {
	c.Lock()
	defer c.Unlock()
	c.m = make(map[string]*list.Element, c.config.MaxItems)
	c.l.Init()
	c.size = 0
}
572294
func (w *Writer) Reset(writer io.Writer) (err error) {
	w.seq++
	if w.err == nil {
		w.writePending()
		err = w.err
	}
	w.w = writer
	w.f, _ = writer.(flusher)
	w.i = 0
	w.j = 0
	w.written = 0
	w.first = false
	w.pending = false
	w.err = nil
	return
}