Summary
Creates a new
Weaver.ObjectPool`1 which uses the `createItem` function to create new objects
when the pool is empty. The pool immediately creates a number of items specified by `preAllocate`.
- Assembly
- Weaver
.dll - Namespace
- Weaver
- Containing Type
- ObjectPool
<T>
Syntax
public ObjectPool(Func<T> createItem, int preAllocate = 0)
Parameters
| Name | Type | Description |
|---|---|---|
| createItem | Func |
|
| preAllocate | int |
Return Value
| Type | Description |
|---|---|
| void |