Navigation
API > API/Runtime > API/Runtime/CoreUObject
| Name | FUObjectArray |
| Type | class |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/UObjectArray.h |
| Include Path | #include "UObject/UObjectArray.h" |
Syntax
class FUObjectArray
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FUObjectArray() |
Constructor, initializes to no permanent object pool | UObject/UObjectArray.h |
Classes
| Name | Remarks |
|---|---|
| FUObjectCreateListener | Base class for UObjectBase create class listeners |
| FUObjectDeleteListener | Base class for UObjectBase delete class listeners |
| TIterator | Low level iterator. |
Enums
Public
| Name | Remarks |
|---|---|
| ESerialNumberConstants |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| TUObjectArray | FChunkedFixedUObjectArray | Typedef TStaticIndirectArrayThreadSafeRead<UObjectBase, 8 * 1024 * 1024 /* Max 8M UObjects /, 16384 / allocated in 64K/128K chunks */ > TUObjectArray; | UObject/UObjectArray.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bShouldRecycleObjectIndices | bool | If set to false object indices won't be recycled to the global pool and can be explicitly reused when creating new objects | UObject/UObjectArray.h | |
| MaxObjectsNotConsideredByGC | int32 | Maximum number of objects in the disregard for GC Pool | UObject/UObjectArray.h | |
| ObjAvailableList | TArray< int32 > | Available object indices. | UObject/UObjectArray.h | |
| ObjFirstGCIndex | int32 | First index into objects array taken into account for GC. | UObject/UObjectArray.h | |
| ObjLastNonGCIndex | int32 | Index pointing to last object created in range disregarded for GC. | UObject/UObjectArray.h | |
| ObjObjects | TUObjectArray | Array of all live objects. | UObject/UObjectArray.h | |
| ObjObjectsCritical | FTransactionallySafeCriticalSection | Synchronization object for all live objects. | UObject/UObjectArray.h | |
| OpenForDisregardForGC | bool | If true this is the intial load and we should load objects int the disregarded for GC range. | UObject/UObjectArray.h | |
| PrimarySerialNumber | FThreadSafeCounter | Current primary serial number | UObject/UObjectArray.h | |
| UObjectCreateListeners | TArray< FUObjectCreateListener * > | Array of things to notify when a UObjectBase is created | UObject/UObjectArray.h | |
| UObjectDeleteListeners | TArray< FUObjectDeleteListener * > | Array of things to notify when a UObjectBase is destroyed | UObject/UObjectArray.h | |
| UObjectDeleteListenersCritical | FTransactionallySafeCriticalSection | UObject/UObjectArray.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddUObjectCreateListener
(
FUObjectCreateListener* Listener |
Adds a new listener for object creationAdds a creation listener | UObject/UObjectArray.h | |
void AddUObjectDeleteListener
(
FUObjectDeleteListener* Listener |
Adds a new listener for object deletionChecks whether object is part of permanent object pool. | UObject/UObjectArray.h | |
void AllocateObjectPool
(
int32 MaxUObjects, |
Allocates and initializes the permanent object pool | UObject/UObjectArray.h | |
int32 AllocateSerialNumber
(
int32 Index |
Given a UObject index return the serial number. | UObject/UObjectArray.h | |
void AllocateUObjectIndex
(
UObjectBase* Object, |
Adds a uobject to the global array which is used for uobject iteration | UObject/UObjectArray.h | |
void CloseDisregardForGC() |
After the initial load, this closes the disregard pool so that new object are GC-able | UObject/UObjectArray.h | |
void DisableDisregardForGC() |
Disables the disregard for GC optimization. | UObject/UObjectArray.h | |
bool DisregardForGCEnabled() |
Indicates if the disregard for GC optimization is active | UObject/UObjectArray.h | |
void DumpUObjectCountsToLog() |
UObject/UObjectArray.h | ||
void FreeUObjectIndex
(
UObjectBase* Object |
Returns a UObject index top to the global uobject array | UObject/UObjectArray.h | |
SIZE_T GetAllocatedSize() |
UObject/UObjectArray.h | ||
SIZE_T GetDeleteListenersAllocatedSize
(
int32* OutNumListeners |
UObject/UObjectArray.h | ||
int32 GetFirstGCIndex() |
Returns the index of the first object outside of the disregard for GC pool | UObject/UObjectArray.h | |
int32 GetObjectArrayCapacity() |
Returns the estimated number of object indices available for allocation | UObject/UObjectArray.h | |
int32 GetObjectArrayEstimatedAvailable() |
Returns the estimated number of object indices available for allocation | UObject/UObjectArray.h | |
int32 GetObjectArrayNum() |
Returns the size of the global UObject array, some of these might be unused | UObject/UObjectArray.h | |
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 | UObject/UObjectArray.h | |
int32 GetObjectArrayNumMinusPermanent() |
Returns the size of the global UObject array minus the number of permanent objects | UObject/UObjectArray.h | |
int32 GetObjectArrayNumPermanent() |
Returns the number of permanent objects | UObject/UObjectArray.h | |
const TUObjectArray & GetObjectItemArrayUnsafe () |
UObject/UObjectArray.h | ||
| INTERNAL USE ONLY: gets the internal FUObjectItem array | UObject/UObjectArray.h | ||
int32 GetSerialNumber
(
int32 Index |
Given a UObject index return the serial number. | UObject/UObjectArray.h | |
FUObjectItem * IndexToObject
(
int32 Index, |
UObject/UObjectArray.h | ||
FUObjectItem * IndexToObject
(
int32 Index |
Returns the UObject corresponding to index. | UObject/UObjectArray.h | |
FUObjectItem * IndexToObjectUnsafeForGC
(
int32 Index |
UObject/UObjectArray.h | ||
FUObjectItem * IndexToValidObject
(
int32 Index, |
UObject/UObjectArray.h | ||
bool IsDisregardForGC
(
const UObjectBase* Object |
Returns true if this object is "disregard for GC"...same results as the legacy RF_DisregardForGC flag | UObject/UObjectArray.h | |
bool IsOpenForDisregardForGC() |
Returns true if the disregard for GC pool is open | UObject/UObjectArray.h | |
bool IsStale
(
int32 Index, |
UObject/UObjectArray.h | ||
bool IsStale
(
FUObjectItem* ObjectItem, |
UObject/UObjectArray.h | ||
bool IsValid
(
int32 Index, |
UObject/UObjectArray.h | ||
bool IsValid
(
const UObjectBase* Object |
Checks if a UObject pointer is valid | UObject/UObjectArray.h | |
bool IsValid
(
FUObjectItem* ObjectItem, |
UObject/UObjectArray.h | ||
bool IsValidIndex
(
const UObjectBase* Object |
Checks if the object index is valid. | UObject/UObjectArray.h | |
void LockInternalArray() |
Locks the internal object array mutex | UObject/UObjectArray.h | |
int32 ObjectToIndex
(
const UObjectBase* Object |
Returns the index of a UObject. | UObject/UObjectArray.h | |
FUObjectItem * ObjectToObjectItem
(
const UObjectBase* Object |
UObject/UObjectArray.h | ||
void OpenDisregardForGC() |
If there's enough slack in the disregard pool, we can re-open it and keep adding objects to it | UObject/UObjectArray.h | |
void RemoveObjectFromDeleteListeners
(
UObjectBase* Object |
Removes an object from delete listeners | UObject/UObjectArray.h | |
void RemoveUObjectCreateListener
(
FUObjectCreateListener* Listener |
Removes a listener for object creation | UObject/UObjectArray.h | |
void RemoveUObjectDeleteListener
(
FUObjectDeleteListener* Listener |
Removes a listener for object deletionremoves a listener for object deletion | UObject/UObjectArray.h | |
void ShutdownUObjectArray() |
Clears some internal arrays to get rid of false memory leaks | UObject/UObjectArray.h | |
void UnlockInternalArray() |
Unlocks the internal object array mutex | UObject/UObjectArray.h |