Skip to content

Add sync.Pool to Context for Map and Slice #1

@xdg

Description

@xdg

With a sync.Pool in the Context, generators can use them to get new Maps and Slices, and then users can put them back in the pool via the context for reuse:

obj := factory(context)
// do stuff with obj
context.PutMap(obj)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions