Skip to content

改变 pool.NewBuffer 的行为,响应固定容量的BufferPool #19

@thinkeridea

Description

@thinkeridea

pool.NewBuffer#16 中引入的方法,实现根据实际使用场景动态评估默认 bytes.Buffer 容量的方法,因测试存在bug(在 #17 #18 中发现及修复) 后被弃用,但是考虑 BufferPool 接口可以简化使用 sync.Pool 获取及响应 bytes.Buffer实例,故通过改变 pool.NewBuffer 的行为,响应一个独立的非共享的 BufferPool,每次调用都会返回新的 BufferPool

Metadata

Metadata

Assignees

No one assigned

    Labels

    optimizePromote or improve code functionality and performance

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions