Skip to content

Commit

Permalink
chore: del testing code
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Feb 26, 2025
1 parent cb17e53 commit 6f90ffe
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions utils/binary/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"compress/gzip"
"compress/zlib"
"sync"
"unsafe"

"github.com/fumiama/orbyte"
"github.com/fumiama/orbyte/pbuf"
Expand All @@ -17,12 +16,6 @@ var bufferPool = pbuf.NewBufferPool[teacfg]()

type Builder orbyte.Item[pbuf.UserBuffer[teacfg]]

func init() {
x := *(**orbyte.Pool[pbuf.UserBuffer[teacfg]])(unsafe.Pointer(&bufferPool))
x.SetManualDestroy(true)
x.SetNoPutBack(true)
}

// NewBuilder 从池中取出一个 Builder
func NewBuilder(key ...byte) *Builder {
b := bufferPool.NewBuffer(nil)
Expand Down

0 comments on commit 6f90ffe

Please sign in to comment.