// Clear empties the view's internal buffer.
513415
func (v *View) Clear() {
	v.tainted = true

	v.lines = nil
	v.viewLines = nil
	v.readOffset = 0
	v.clearRunes()
}
444888
func (g *Oper) Clear() error {
	key := operGlobalPath
	return g.StateDriver.ClearState(key)
}
915603
func ClearView(ctx context.Context, view ClearableView) error {
	if view == nil {
		return nil
	}

	// Collect all the keys
	keys, err := CollectKeys(ctx, view)
	if err != nil {
		return err
	}

	// Delete all the keys
	for _, key := range keys {
		if err := view.Delete(ctx, key); err != nil {
			return err
		}
	}
	return nil
}
467542
func (t *Table) Clear() *Table {
	t.cells = nil
	t.lastColumn = -1
	return t
}
1010039
func (t *PrimaryTree) Clear() {
	if t.r == nil {
		return
	}

	clr1(t.r)
	t.c, t.first, t.last, t.r = 0, nil, nil, nil
	atomic.AddUint64(&t.ver, 1)
}
254927
func (s *GlobConfig) Clear() error {
	key := globalConfigPath
	return s.StateDriver.ClearState(key)
}
383948
func (n *NotifyGroup) Clear(ch chan struct{}) {
	n.l.Lock()
	defer n.l.Unlock()
	if n.notify == nil {
		return
	}
	delete(n.notify, ch)
}
564583
func (m *clientConnMap) Clear() {
	m.Lock()

	for _, conn := range m.conns {
		_ = conn.Close()
	}

	m.conns = make(map[string]*grpc.ClientConn)
	m.Unlock()
}
457232
func (c *SyncCollector) Clear() {
	for k := range c.c {
		c.rw.Lock()
		delete(c.c, k)
		c.rw.Unlock()
	}
}
1210787
func (c *Cache) Clear() {
	c.Lock()
	defer c.Unlock()
	if c.onEvicted != nil {
		for _, ci := range c.cache {
			c.onEvicted(ci.itemID, ci.value)
		}
	}
	c.cache = make(map[string]*cachedItem)
	c.groups = make(map[string]map[string]struct{})
	c.lruIdx = c.lruIdx.Init()
	c.lruRefs = make(map[string]*list.Element)
	c.ttlIdx = c.ttlIdx.Init()
	c.ttlRefs = make(map[string]*list.Element)
}
402695
func (l *Loader) Clear(ctx context.Context, key Key) Interface {
	l.cacheLock.Lock()
	l.cache.Delete(ctx, key)
	l.cacheLock.Unlock()
	return l
}
72394
func (as *AttributeSource) Clear() {
	for state := as.currentState(); state != nil; state = state.next {
		state.attribute.Clear()
	}
}
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()
}
815613
func (s *SvcProvider) Clear() error {
	key := fmt.Sprintf(svcProviderPath, s.ID)
	err := s.StateDriver.ClearState(key)
	return err
}
1344552
func (s *session) Clear(table string) error {
	action, err := s.clear(table)
	if err != nil {
		return s.catch("Clear "+table+": "+action, err)
	}
	return nil
}
483707
func Clear(w http.ResponseWriter, r *http.Request, sess *sessions.Session) {
	// Delete the map if it doesn't exist
	if _, ok := sess.Values[TokenName]; ok {
		delete(sess.Values, TokenName)
		sess.Save(r, w)
	}
}
330798
func (h *HyperLogLogPlus) Clear() {
	h.sparse = true
	h.tmpSet = set{}
	h.sparseList = newCompressedList(int(h.m))
	h.reg = nil
}