ObjectPool<T> constructor

ObjectPool<T>({
  1. required T factory(),
  2. void resetFn(
    1. T
    )?,
  3. int maxPoolSize = 1000,
})

Implementation

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