// Clear to clear the history.
421574
func (h *History) Clear() {
	h.tmp = make([]string, len(h.histories))
	for i := range h.histories {
		h.tmp[i] = h.histories[i]
	}
	h.tmp = append(h.tmp, "")
	h.selected = len(h.tmp) - 1
}
555501
func (cl *memChangelist) Clear(archive string) error {
	// appending to a nil list initializes it.
	cl.changes = nil
	return nil
}
134779
func (t *Trie) Clear() {
	t.root.internal = nil
	t.root.external = nil
	t.size = 0
}
715077
func (h *Handlers) Clear() {
	h.Validate.Clear()
	h.Build.Clear()
	h.Send.Clear()
	h.Sign.Clear()
	h.Unmarshal.Clear()
	h.UnmarshalStream.Clear()
	h.UnmarshalMeta.Clear()
	h.UnmarshalError.Clear()
	h.ValidateResponse.Clear()
	h.Retry.Clear()
	h.AfterRetry.Clear()
	h.CompleteAttempt.Clear()
	h.Complete.Clear()
}
408643
func (s *Set) Clear() {
	s.lock.Lock()
	defer s.lock.Unlock()
	s.items = make(map[interface{}]struct{})
}
854734
func (b *messageBuffer) clear() {
	b.mu.Lock()
	backlog := b.backlog
	b.backlog = nil
	b.mu.Unlock()

	select {
	case m := <-b.c:
		m.next()
	default:
	}
	for _, m := range backlog {
		m.next()
	}
}
815613
func (s *SvcProvider) Clear() error {
	key := fmt.Sprintf(svcProviderPath, s.ID)
	err := s.StateDriver.ClearState(key)
	return err
}
735783
func (s *EndpointGroupState) Clear() error {
	key := fmt.Sprintf(epGroupConfigPath, s.ID)
	return s.StateDriver.ClearState(key)
}
634842
func (c *Ctrie) Clear() {
	for {
		root := c.readRoot()
		gen := &generation{}
		newRoot := &iNode{
			main: &mainNode{cNode: &cNode{array: make([]branch, 0), gen: gen}},
			gen:  gen,
		}
		if c.rdcssRoot(root, gcasRead(root, c), newRoot) {
			return
		}
	}
}
1182785
func (c *Cluster) Clear() {
	c.mu.Lock()

	c.members = make(map[uint64]*Member)
	c.removed = make(map[uint64]bool)
	c.mu.Unlock()
}
582574
func (this *MemoryStore) Clear() error {
	this.l.Lock()
	defer this.l.Unlock()
	this.newMap()
	return nil
}
444888
func (g *Oper) Clear() error {
	key := operGlobalPath
	return g.StateDriver.ClearState(key)
}
143132
func (me *Event) Clear() {
	if me.closed {
		me.ch = nil
		me.closed = false
	}
}
1230691
func (c *Cache) clear() { // nolint: staticcheck,unused
	if c.OnEvicted != nil {
		for _, e := range c.cache {
			kv := e.Value.(*entry)
			c.OnEvicted(kv.key, kv.value)
		}
	}
	c.ll = nil
	c.cache = nil
}
574037
func (handler *Handler) Clear() {
	handler.mutex.Lock()
	handler.events = []*event.Event{}
	handler.mutex.Unlock()
}
497750
func (h *Handle) Clear() {
	h.mu.Lock()
	h.StatsCache.Store(StatsCache{})
	h.mu.lastVersion = 0
	for len(h.ddlEventCh) > 0 {
		<-h.ddlEventCh
	}
	h.feedback = h.feedback[:0]
	h.mu.ctx.GetSessionVars().InitChunkSize = 1
	h.mu.ctx.GetSessionVars().MaxChunkSize = 32
	h.listHead = &SessionStatsCollector{mapper: make(tableDeltaMap), rateMap: make(errorRateDeltaMap)}
	h.globalMap = make(tableDeltaMap)
	h.mu.rateMap = make(errorRateDeltaMap)
	h.mu.Unlock()
}
221065
func (lru *LRUCache) Clear() {
	lru.mu.Lock()
	defer lru.mu.Unlock()

	lru.list.Init()
	lru.table = make(map[string]*list.Element)
	lru.size = 0
}