MCPcopy
hub / github.com/kopia/kopia / Close

Method Close

internal/gather/gather_write_buffer.go:21–34  ·  view source on GitHub ↗

Close releases all memory allocated by this buffer.

()

Source from the content-addressed store, hash-verified

19
20// Close releases all memory allocated by this buffer.
21func (b *WriteBuffer) Close() {
22 b.mu.Lock()
23 defer b.mu.Unlock()
24
25 if b.alloc != nil {
26 for _, s := range b.inner.Slices {
27 b.alloc.releaseChunk(s)
28 }
29
30 b.alloc = nil
31 }
32
33 b.inner.invalidate()
34}
35
36// MakeContiguous ensures the write buffer consists of exactly one contiguous single slice of the provided length
37// and returns the slice.

Callers 15

runBenchmarkMethod · 0.95
maybeDecryptBlobMethod · 0.95
runBenchmarkMethod · 0.95
syncCopyBlobMethod · 0.95
runMethod · 0.95
runBenchmarkMethod · 0.95
runDecompressionMethod · 0.95

Calls 4

releaseChunkMethod · 0.80
invalidateMethod · 0.80
LockMethod · 0.65
UnlockMethod · 0.65