Skip to main content

Module pool

Module pool 

Source
Expand description

Object pool for reusing frequently allocated types.

If you’re creating and destroying the same type of object repeatedly (like temporary buffers during query execution), a pool avoids the allocation overhead. Objects are reset and returned to the pool instead of being freed.

Structs§

ObjectPool
A thread-safe object pool for reusing allocations.
Pooled
A borrowed object from the pool - returns automatically when dropped.

Type Aliases§

VecPool
A specialized pool for Vec<T> that clears vectors on return.