mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-01-04 16:25:21 -05:00
refine buffer struct
This commit is contained in:
@@ -29,12 +29,7 @@ func (p *BufferPool) Allocate() *Buffer {
|
||||
default:
|
||||
b = p.allocator.Get().([]byte)
|
||||
}
|
||||
return &Buffer{
|
||||
head: b,
|
||||
pool: p,
|
||||
Value: b[defaultOffset:],
|
||||
offset: defaultOffset,
|
||||
}
|
||||
return CreateBuffer(b, p)
|
||||
}
|
||||
|
||||
func (p *BufferPool) Free(buffer *Buffer) {
|
||||
|
||||
Reference in New Issue
Block a user