Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Commit daa8272

Browse files
committed
support PointSlicePool.PutMaybeNil
1 parent 0437c59 commit daa8272

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pointslicepool/pointslicepool.go

+6
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ func New(defaultSize int) *PointSlicePool {
4444
}
4545
}
4646

47+
func (p *PointSlicePool) PutMaybeNil(s []schema.Point) {
48+
if s != nil {
49+
p.Put(s)
50+
}
51+
}
52+
4753
func (p *PointSlicePool) Put(s []schema.Point) {
4854
if cap(s) >= p.defaultSize {
4955
p.putLarge.Inc()

0 commit comments

Comments
 (0)