// Clean returns all buffers (all input data + generated series along the way)
// back to the pool.
344877
func (p Plan) Clean() {
	for _, series := range p.data {
		for _, serie := range series {
			pointSlicePool.Put(serie.Datapoints[:0])
		}
	}
}
773693
func (s *UniformSample) Clear() {
	s.mutex.Lock()
	defer s.mutex.Unlock()
	s.count = 0
	s.values = make([]int64, 0, s.reservoirSize)
}
483094
func CleanUp(t TestReporter) {
	for _, path := range Files {
		if err := appFs.RemoveAll(path); err != nil {
			t.Error(appFs.Name(), err)
		}
	}

	Files = make([]string, 0)
}
1161863
func (r *readWorkerState) Cleanup() {
	r.bufferPool.Return(r.readBuf)
	r.readBuf = nil
}
1206704
func (b *Buffer) Clear() {
	b.rw.Lock()
	{
		b.buffer = nil
	}
	b.rw.Unlock()
}
445012
func (m *MemoryStorer) Clean() {
	t := time.Now().UTC()
	m.mut.Lock()
	for id, session := range m.sessions {
		if t.After(session.expires) {
			delete(m.sessions, id)
		}
	}
	m.mut.Unlock()
}
311305
func (c *RollingCounter) cleanup() {
	now := c.clock.UtcNow()
	for i := 0; i < len(c.values); i++ {
		now = now.Add(time.Duration(-1*i) * c.resolution)
		if now.Truncate(c.resolution).After(c.lastUpdated.Truncate(c.resolution)) {
			c.values[c.getBucket(now)] = 0
		} else {
			break
		}
	}
}
969795
func (w *Writer) Flush() error {
	if (!w.dirty && w.Buffered() == 0) || w.err != nil {
		return w.err
	}

	w.err = w.flushFragment(true)
	w.n = 0
	w.dirty = false
	w.fragmented = false

	return w.err
}
412665
func Clean(b []byte) []byte {
	if len(b) >= 3 &&
		b[0] == bom0 &&
		b[1] == bom1 &&
		b[2] == bom2 {
		return b[3:]
	}
	return b
}
8751
func (konsolePipe *ConsolePipe) Clean() {
	konsolePipe.Konsole.Process.Kill()
	os.Remove(konsolePipe.PipePath)
}
747836
func (w *buffer) reset() {
	for i := range (*w)[:cap(*w)] {
		(*w)[i] = 0
	}
	*w = (*w)[:0]
}
37189
func (c *Container) Clear() {

	for c.next != nil {
		if c.next.length == 0 {
			if c.pool != nil {
				c.pool.Put(c.next)
			}
			c.next = nil
			break
		}
		s := c.next
		for s.next != nil {
			if s.next.length == 0 {
				if s.pool != nil {
					s.pool.Put(s.next)
				}
				s.next = nil
				break
			}
			s = s.next
			break
		}
		for k := num - 1; k >= 0; k-- {
			s.Delete(s.items[k].Key)
		}

		s.length = 0
		if s.pool != nil {
			s.pool.Put(s)
		}
	}

	for _, v := range c.items {
		v.Key = nil
		v.Value = nil
	}
	c.length = 0
	return
}
1041737
func (i *Image) cleanupAll() {
	i.cleanup()
	err := os.Remove(i.FilePath)
	if err != nil {
		logger.Debugf("got %q removing %q", err.Error(), i.FilePath)
	}
}
1066386
func (stats *Stats) Clear() {
	stats.durations = stats.durations[:0]
	stats.histogram = nil
	stats.dirty = false
	stats.result = BenchResults{}
}
805258
func (renderer *Renderer) Clear() error {
	return errorFromInt(int(
		C.SDL_RenderClear(renderer.cptr())))
}
364063
func (h *BytesRefHash) Clear(resetPool bool) {
	h.lastCount = h.count
	h.count = 0
	if resetPool {
		h.pool.Reset(false, false) // we don't need to 0-fill the bufferes
	}
	h.bytesStart = h.bytesStartArray.Clear()
	if h.lastCount != -1 && h.shrink(h.lastCount) {
		// shurnk clears the hash entries
		return
	}
	for i, _ := range h.ids {
		h.ids[i] = -1
	}
}
844355
func (b *Buffer) Flush() {
	b.prepare(b.bufferSize())

	for i := range b.buffers {
		if buffer := &b.buffers[i]; buffer.acquire() {
			buffer.flush(b.Serializer, buffer.len())
			buffer.release()
		}
	}
}