Navigation
API > API/Runtime > API/Runtime/Core
Thread safe, lock free pooling allocator of memory for instances of T.
Never returns free space until program shutdown.
| Name | TLockFreeClassAllocator |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/LockFreeFixedSizeAllocator.h |
| Include Path | #include "Containers/LockFreeFixedSizeAllocator.h" |
Syntax
template<class T, int TPaddingForCacheContention>
class TLockFreeClassAllocator : private TLockFreeFixedSizeAllocator< sizeof, TPaddingForCacheContention, FNoopCounter >
Inheritance Hierarchy
- TLockFreeFixedSizeAllocator → TLockFreeClassAllocator
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void * Allocate () |
Returns a memory block of size sizeof(T). | Containers/LockFreeFixedSizeAllocator.h | |
void Free
(
T* Item |
Calls a destructor on Item and returns the memory to the free list for recycling. | Containers/LockFreeFixedSizeAllocator.h | |
T * New () |
Returns a new T using the default constructor. | Containers/LockFreeFixedSizeAllocator.h |