Navigation
API > API/Runtime > API/Runtime/ChaosCore > API/Runtime/ChaosCore/TObjectPool
Description
Allocate an object from the pool Returns an instance of the object type specified for this pool, either from the next available on the final block, the free list or by allocating a new block to continue providing objects. As this method may defer to the runtime allocator it may sometimes run significantly slower when the pool is exhausted Requires that the object is default constructible
| Name | Alloc |
| Type | function |
| Header File | /Engine/Source/Runtime/Experimental/ChaosCore/Public/Chaos/ObjectPool.h |
| Include Path | #include "Chaos/ObjectPool.h" |
template<typename... TArgs>
FPtr Alloc
(
TArgs &&... Args
)
The newly allocated object
Parameters
| Name | Remarks |
|---|---|
| Args | ObjectType constructor arguments |