MCPcopy
hub / github.com/segmentio/kafka-go / unref

Method unref

protocol/buffer.go:492–501  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

490}
491
492func (ref *pageRef) unref() {
493 if atomic.CompareAndSwapUint32(&ref.once, 0, 1) {
494 ref.pages.unref()
495 ref.pages.clear()
496 ref.pages = nil
497 ref.offset = 0
498 ref.cursor = 0
499 ref.length = 0
500 }
501}
502
503func (ref *pageRef) Len() int { return int(ref.Size() - ref.cursor) }
504

Callers 1

CloseMethod · 0.95

Calls 2

clearMethod · 0.80
unrefMethod · 0.45

Tested by

no test coverage detected