TMediaObjectPool

Template for media object pools.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

MediaUtils

Header

/Engine/Source/Runtime/MediaUtils/Public/MediaObjectPool.h

Include

#include "MediaObjectPool.h"

Syntax

template<typename ObjectType, typename ObjectAllocator>
class TMediaObjectPool

Remarks

Template for media object pools.

Poolable objects are required to implement the IMediaPoolable interface.

Constructors

Name Description

Public function

TMediaObjectPool

(
    ObjectAllocator* ObjectAllocat...
)

Default constructor.

Public function

TMediaObjectPool

(
    uint32 NumReserve
)

Create and initialize a new instance.

Functions

Name Description

Public function

ObjectType &...

 

Acquire()

Acquire an untracked object from the pool.

Public function

TSharedRef< ...

 

AcquireShared()

Acquire a shared object from the pool.

Public function Const

int32

 

Num()

Get the number of objects available in the pool.

Public function

void

 

Release

(
    ObjectType* Object
)

Return the given object to the pool.

Public function

void

 

Reset

(
    uint32 NumObjects
)

Reset the pool and reserve a specified number of objects.

Public function

void

 

Tick()

Regular tick call

Public function

TSharedRef< ...

 

ToShared

(
    ObjectType* Object
)

Convert an object to a shared pooled object.