FUObjectArray

Windows
MacOS
Linux

References

Module

CoreUObject

Header

/Engine/Source/Runtime/CoreUObject/Public/UObject/UObjectArray.h

Include

#include "UObject/UObjectArray.h"

Syntax

class FUObjectArray

Constructors

Name Description

Public function

FUObjectArray()

Constructor, initializes to no permanent object pool

Functions

Name Description

Public function

void

 

AddUObjectCreateListener

(
    FUObjectCreateListener* Listen...
)

Adds a new listener for object creation

Adds a creation listener

Public function

void

 

AddUObjectDeleteListener

(
    FUObjectDeleteListener* Listen...
)

Adds a new listener for object deletion

Checks whether object is part of permanent object pool.

Public function

void

 

AllocateObjectPool

(
    int32 MaxUObjects,
    int32 MaxObjectsNotConsideredByGC,
    bool bPreAllocateObjectArray
)

Allocates and initializes the permanent object pool

Public function

int32

 

AllocateSerialNumber

(
    int32 Index
)

Given a UObject index return the serial number.

Public function

void

 

AllocateUObjectIndex

(
    UObjectBase* Object,
    bool bMergingThreads
)

Adds a uobject to the global array which is used for uobject iteration

Public function

void

 

CloseDisregardForGC()

After the initial load, this closes the disregard pool so that new object are GC-able

Public function

void

 

DisableDisregardForGC()

Disables the disregard for GC optimization.

Public function Const

bool

 

DisregardForGCEnabled()

Indicates if the disregard for GC optimization is active

Public function

void

 

FreeUObjectIndex

(
    UObjectBase* Object
)

Returns a UObject index top to the global uobject array

Public function Const

int64

 

GetAllocatedSize()

Public function Const

int32

 

GetFirstGCIndex()

Returns the index of the first object outside of the disregard for GC pool

Public function

int32

 

GetObjectArrayEstimatedAvailable()

Returns the estimated number of object indices available for allocation

Public function Const

int32

 

GetObjectArrayNum()

Returns the size of the global UObject array, some of these might be unused

Public function

int32

 

GetObjectArrayNumMinusAvailable()

Returns the number of actual object indices that are claimed (the total size of the global object array minus the number of available object array elements

Public function Const

int32

 

GetObjectArrayNumMinusPermanent()

Returns the size of the global UObject array minus the number of permanent objects

Public function Const

int32

 

GetObjectArrayNumPermanent()

Returns the number of permanent objects

Public function

TUObjectArra...

 

GetObjectItemArrayUnsafe()

INTERNAL USE ONLY: gets the internal FUObjectItem array

Public function

int32

 

GetSerialNumber

(
    int32 Index
)

Given a UObject index return the serial number.

Public function

FUObjectItem...

 

IndexToObject

(
    int32 Index,
    bool bEvenIfPendingKill
)

Public function

FUObjectItem...

 

IndexToObject

(
    int32 Index
)

Returns the UObject corresponding to index.

Public function

FUObjectItem...

 

IndexToObjectUnsafeForGC

(
    int32 Index
)

Public function

FUObjectItem...

 

IndexToValidObject

(
    int32 Index,
    bool bEvenIfPendingKill
)

Public function

bool

 

IsDisregardForGC

(
    const UObjectBase* Object
)

Returns true if this object is "disregard for GC"...same results as the legacy RF_DisregardForGC flag

Public function Const

bool

 

IsOpenForDisregardForGC()

Returns true if the disregard for GC pool is open

Public function

bool

 

IsStale

(
    int32 Index,
    bool bEvenIfPendingKill
)

Public function

bool

 

IsStale

(
    FUObjectItem* ObjectItem,
    bool bEvenIfPendingKill
)

Public function Const

bool

 

IsValid

(
    const UObjectBase* Object
)

Checks if a UObject pointer is valid

Public function

bool

 

IsValid

(
    FUObjectItem* ObjectItem,
    bool bEvenIfPendingKill
)

Public function

bool

 

IsValid

(
    int32 Index,
    bool bEvenIfPendingKill
)

Public function Const

bool

 

IsValidIndex

(
    const UObjectBase* Object
)

Checks if the object index is valid.

Public function Const

void

 

LockInternalArray()

Locks the internal object array mutex

Public function Const

int32

 

ObjectToIndex

(
    const UObjectBase* Object
)

Returns the index of a UObject.

Public function

FUObjectItem...

 

ObjectToObjectItem

(
    UObjectBase* Object
)

Public function

void

 

OpenDisregardForGC()

If there's enough slack in the disregard pool, we can re-open it and keep adding objects to it

Public function

void

 

RemoveObjectFromDeleteListeners

(
    UObjectBase* Object
)

Removes an object from delete listeners

Public function

void

 

RemoveUObjectCreateListener

(
    FUObjectCreateListener* Listen...
)

Removes a listener for object creation

Public function

void

 

RemoveUObjectDeleteListener

(
    FUObjectDeleteListener* Listen...
)

Removes a listener for object deletion

removes a listener for object deletion

Public function

void

 

ShutdownUObjectArray()

Clears some internal arrays to get rid of false memory leaks

Public function Const

void

 

UnlockInternalArray()

Unlocks the internal object array mutex

Classes

Name

Description

Public class

FUObjectCreateListener

Base class for UObjectBase create class listeners

Public class

FUObjectDeleteListener

Base class for UObjectBase delete class listeners

Public class

TIterator

Low level iterator.

Enums

Name

Description

Public enum

ESerialNumberConstants

Typedefs

Name

Description

TUObjectArray

Typedef TStaticIndirectArrayThreadSafeRead<UObjectBase, 8 * 1024 * 1024 /* Max 8M UObjects */, 16384 /* allocated in 64K/128K chunks */ > TUObjectArray;

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss