MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / Cleanup

Method Cleanup

pkg/sql/scanner/scan.go:105–109  ·  view source on GitHub ↗

Cleanup is used to avoid holding on to memory unnecessarily (for the cases where we reuse a Scanner).

()

Source from the content-addressed store, hash-verified

103// Cleanup is used to avoid holding on to memory unnecessarily (for the cases
104// where we reuse a Scanner).
105func (s *Scanner) Cleanup() {
106 s.bytesPrealloc = nil
107 s.Comments = nil
108 s.retainComments = false
109}
110
111func (s *Scanner) allocBytes(length int) []byte {
112 if cap(s.bytesPrealloc) >= length {

Callers 3

parseWithDepthMethod · 0.80
parseWithDepthMethod · 0.80
ParseMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected