mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-09-27 22:36:12 -04:00
rename buf pool membership status to unmanaged
This commit is contained in:
parent
d781cc0cfd
commit
802780e9e1
@ -20,7 +20,7 @@ type Buffer struct {
|
||||
v []byte
|
||||
start int32
|
||||
end int32
|
||||
out bool
|
||||
unmanaged bool
|
||||
}
|
||||
|
||||
// New creates a Buffer with 0 length and 2K capacity.
|
||||
@ -35,7 +35,7 @@ func As(data []byte) *Buffer {
|
||||
return &Buffer{
|
||||
v: data,
|
||||
end: int32(len(data)),
|
||||
out: true,
|
||||
unmanaged: true,
|
||||
}
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ func StackNew() Buffer {
|
||||
|
||||
// Release recycles the buffer into an internal buffer pool.
|
||||
func (b *Buffer) Release() {
|
||||
if b == nil || b.v == nil || b.out {
|
||||
if b == nil || b.v == nil || b.unmanaged {
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user