A function that creates a new object for the pool. This is called when the pool needs to grow.
OptionalgrowthThe factor by which the pool should grow when it runs out of items, based on its current capacity.
OptionalinitialThe initial number of objects to create and pre-allocate in the pool.
OptionalminThe minimum number of new items to create when the pool needs to grow.
OptionalonAn optional function that is called on an object immediately after it is retrieved from the pool. Use this to reset the object's state.
OptionalonAn optional function that is called when an object is returned to the pool. Use this to clean up or reset the object's state.
OptionalparentAn optional parent tag for hierarchical logging. If provided, logs will show as "parentTag:ObjectPool".
Defines the configuration for creating an ObjectPool.