github.com/coyove/sdss@v0.0.0-20231129015646-c2ec58cca6a2/contrib/roaring/internal/pools.go (about) 1 package internal 2 3 import ( 4 "sync" 5 ) 6 7 var ( 8 // ByteInputAdapterPool shared pool 9 ByteInputAdapterPool = sync.Pool{ 10 New: func() interface{} { 11 return &ByteInputAdapter{} 12 }, 13 } 14 15 // ByteBufferPool shared pool 16 ByteBufferPool = sync.Pool{ 17 New: func() interface{} { 18 return &ByteBuffer{} 19 }, 20 } 21 )