TResourcePool

A templated pool for resources that can only be freed at a 'safe' point in the frame.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/ResourcePool.h

Include

#include "ResourcePool.h"

Syntax

template<typename ResourceType, class ResourcePoolPolicy, class ResourceCreationArguments>
class TResourcePool

Remarks

A templated pool for resources that can only be freed at a 'safe' point in the frame.

Constructors

Name Description

Public function

TResourcePool()

Constructor

Public function

TResourcePool

(
    ResourcePoolPolicy InPolicy
)

Constructor with policy argument

Destructors

Name Description

Public function Virtual

~TResourcePool()

Destructor

Functions

Name Description

Public function

ResourceType

 

CreatePooledResource

(
    ResourceCreationArguments Args
)

Creates a pooled resource.

Public function

void

 

DrainPool

(
    bool bForceDrainAll
)

Drain the pool of freed resources that need to be culled or prepared for reuse.

Public function

uint32

 

PooledSizeForCreationArguments

(
    ResourceCreationArguments Args
)

Gets the size a pooled object will use when constructed from the pool.

Public function

void

 

ReleasePooledResource

(
    const ResourceType& Resource
)

Release a resource back into the pool.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback