ObjectPool<T> constructor
ObjectPool<T> ({
- required T factory(),
- void resetFn(
- T
- int maxPoolSize = 1000,
Implementation
ObjectPool({
required T Function() factory,
void Function(T)? resetFn,
int maxPoolSize = 1000,
}) : _factory = factory,
_resetFn = resetFn,
_maxPoolSize = maxPoolSize;