rtp改成链表形式

This commit is contained in:
dexter
2023-02-01 10:42:50 +08:00
parent b27e032435
commit f2847be29f
9 changed files with 128 additions and 71 deletions

View File

@@ -278,3 +278,13 @@ func (p BytesPool) Get(size int) (item *ListItem[Buffer]) {
}
return
}
type Pool[T any] List[T]
func (p *Pool[T]) Get() (item *ListItem[T]) {
item = (*List[T])(p).PoolShift()
if item == nil {
item = &ListItem[T]{}
}
return
}