Revert "chore: reduce memory alloc"

This reverts commit a6b816b1c6.
This commit is contained in:
Larvan2
2023-11-22 19:22:15 +08:00
parent 6a3e28c384
commit 8b4499e461
3 changed files with 37 additions and 28 deletions

View File

@@ -129,7 +129,6 @@ func (h *ListenerHandler) NewPacketConnection(ctx context.Context, conn network.
conn2 = nil
}()
var buff *buf.Buffer
defer buff.Release()
newBuffer := func() *buf.Buffer {
buff = buf.NewPacket() // do not use stack buffer
return buff