![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <MediaObjectPool.h>
Public Member Functions | |
| TMediaObjectPool (ObjectAllocator *ObjectAllocatorInstance=nullptr) | |
| TMediaObjectPool (uint32 NumReserve) | |
| ObjectType * | Acquire (bool bAlloc=true) |
| TSharedRef< ObjectType, ESPMode::ThreadSafe > | AcquireShared () |
| TSharedPtr< ObjectType, ESPMode::ThreadSafe > | AcquireShared (bool bAlloc) |
| int32 | Num () const |
| TSharedRef< ObjectType, ESPMode::ThreadSafe > | ToShared (ObjectType *Object) |
| void | Release (ObjectType *Object) |
| void | Reset (uint32 NumObjects=0) |
| void | Tick () |
Template for media object pools.
Poolable objects are required to implement the IMediaPoolable interface.
| ObjectType | The type of objects managed by this pool. |
|
inline |
Default constructor.
|
inline |
Create and initialize a new instance.
| NumReserve | Number of objects to reserve. |
|
inline |
Acquire an untracked object from the pool.
Use the Release method to return the object to the pool. You can use the ToShared and ToUnique methods to convert this object to a tracked shared object later if desired. bAlloc allows to chose if new object should be allocated and added to the pool.
|
inline |
Acquire a shared object from the pool.
Shared objects do not need to be returned to the pool. They'll be reclaimed automatically when their reference count goes to zero.
|
inline |
Acquire a shared object from the pool.
Shared objects do not need to be returned to the pool. They'll be reclaimed automatically when their reference count goes to zero. bAlloc allows to chose if new object should be allocated and added to the pool.
|
inline |
Get the number of objects available in the pool.
|
inline |
Return the given object to the pool.
This method can return plain old C++ objects to the pool. Do not use this method with objects acquired via AcquireShared or AcquireUnique, because those are returned automatically.
|
inline |
Reset the pool and reserve a specified number of objects.
| NumObjects | Number of objects to reserve (default = 0). |
|
inline |
Regular tick call
|
inline |
Convert an object to a shared pooled object.
| Object | The object to convert. |