Navigation
API > API/Runtime > API/Runtime/MediaUtils > API/Runtime/MediaUtils/TMediaObjectPool
Object pool storage.
| Name | TStorage |
| Type | class |
| Header File | /Engine/Source/Runtime/MediaUtils/Public/MediaObjectPool.h |
| Include Path | #include "MediaObjectPool.h" |
Syntax
class TStorage
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TStorage
(
ObjectAllocator* InObjectAllocatorInstance |
MediaObjectPool.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~TStorage() |
Destructor. | MediaObjectPool.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CriticalSection | FCriticalSection | Critical section for synchronizing access to the free list. | MediaObjectPool.h | |
| ObjectAllocatorInstance | ObjectAllocator * | Object allocator instance (nullptr by default) | MediaObjectPool.h | |
| Pool | TArray< ObjectType * > | List of unused objects. | MediaObjectPool.h | |
| WaitReadyForReuse | TQueue< ObjectType * > | List of unused objects, waiting for reuse-ability. | MediaObjectPool.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ObjectType * Acquire
(
bool bAlloc |
Acquire an object from the pool. | MediaObjectPool.h | |
int32 Num() |
Get the number of objects stored. | MediaObjectPool.h | |
void Release
(
ObjectType* Object |
Return the given object to the pool. | MediaObjectPool.h | |
void Reserve
(
uint32 NumObjects |
Reserve the specified number of objects. | MediaObjectPool.h | |
void Tick() |
Regular tick call | MediaObjectPool.h |