#include <UObjectArray.h>
|
| COREUOBJECT_API | FUObjectArray () |
| |
| COREUOBJECT_API void | AllocateObjectPool (int32 MaxUObjects, int32 MaxObjectsNotConsideredByGC, bool bPreAllocateObjectArray) |
| |
| COREUOBJECT_API void | DisableDisregardForGC () |
| |
| COREUOBJECT_API void | OpenDisregardForGC () |
| |
| COREUOBJECT_API void | CloseDisregardForGC () |
| |
| bool | IsOpenForDisregardForGC () const |
| |
| bool | DisregardForGCEnabled () const |
| |
| COREUOBJECT_API void | AllocateUObjectIndex (class UObjectBase *Object, EInternalObjectFlags InitialFlags, int32 AlreadyAllocatedIndex=-1, int32 SerialNumber=0, FRemoteObjectId RemoteId=FRemoteObjectId()) |
| |
| COREUOBJECT_API void | FreeUObjectIndex (class UObjectBase *Object) |
| |
| UE_FORCEINLINE_HINT int32 | ObjectToIndex (const class UObjectBase *Object) const |
| |
| FUObjectItem * | IndexToObject (int32 Index) |
| |
| UE_FORCEINLINE_HINT FUObjectItem * | IndexToObjectUnsafeForGC (int32 Index) |
| |
| FUObjectItem * | IndexToObject (int32 Index, bool bEvenIfGarbage) |
| |
| FUObjectItem * | ObjectToObjectItem (const UObjectBase *Object) |
| |
| bool | IsValid (FUObjectItem *ObjectItem, bool bEvenIfGarbage) |
| |
| FUObjectItem * | IndexToValidObject (int32 Index, bool bEvenIfGarbage) |
| |
| bool | IsValid (int32 Index, bool bEvenIfGarbage) |
| |
| UE_FORCEINLINE_HINT bool | IsStale (FUObjectItem *ObjectItem, bool bIncludingGarbage) |
| |
| bool | IsStale (int32 Index, bool bIncludingGarbage) |
| |
| UE_FORCEINLINE_HINT int32 | GetFirstGCIndex () const |
| |
| COREUOBJECT_API void | AddUObjectCreateListener (FUObjectCreateListener *Listener) |
| |
| COREUOBJECT_API void | RemoveUObjectCreateListener (FUObjectCreateListener *Listener) |
| |
| COREUOBJECT_API void | AddUObjectDeleteListener (FUObjectDeleteListener *Listener) |
| |
| COREUOBJECT_API void | RemoveUObjectDeleteListener (FUObjectDeleteListener *Listener) |
| |
| COREUOBJECT_API void | RemoveObjectFromDeleteListeners (UObjectBase *Object) |
| |
| COREUOBJECT_API bool | IsValid (const UObjectBase *Object) const |
| |
| UE_FORCEINLINE_HINT bool | IsValidIndex (const UObjectBase *Object) const |
| |
| UE_FORCEINLINE_HINT bool | IsIndexDisregardForGC (int32 ObjectIndex) const |
| |
| UE_FORCEINLINE_HINT bool | IsDisregardForGC (const class UObjectBase *Object) const |
| |
| UE_FORCEINLINE_HINT int32 | GetObjectArrayNum () const |
| |
| UE_FORCEINLINE_HINT int32 | GetObjectArrayNumMinusPermanent () const |
| |
| UE_FORCEINLINE_HINT int32 | GetObjectArrayNumPermanent () const |
| |
| int32 | GetObjectArrayNumMinusAvailable () const |
| |
| int32 | GetObjectArrayEstimatedAvailable () const |
| |
| int32 | GetObjectArrayCapacity () const |
| |
| COREUOBJECT_API void | ShutdownUObjectArray () |
| |
| COREUOBJECT_API int32 | AllocateSerialNumber (int32 Index) |
| |
| int32 | GetSerialNumber (int32 Index) |
| |
| void | LockInternalArray () const |
| |
| void | UnlockInternalArray () const |
| |
| void | LockUObjectDeleteListeners () |
| |
| void | UnlockUObjectDeleteListeners () |
| |
| TUObjectArray & | GetObjectItemArrayUnsafe () |
| |
| const TUObjectArray & | GetObjectItemArrayUnsafe () const |
| |
| SIZE_T | GetAllocatedSize () const |
| |
| SIZE_T | GetDeleteListenersAllocatedSize (int32 *OutNumListeners=nullptr) const |
| |
| COREUOBJECT_API void | DumpUObjectCountsToLog () const |
| |
|
| class | UObject |
| |
| COREUOBJECT_API UObject * | StaticAllocateObject (const UClass *, UObject *, FName, EObjectFlags, EInternalObjectFlags, bool, bool *, UPackage *, int32, FRemoteObjectId, class FGCReconstructionGuard *) |
| |
◆ ESerialNumberConstants
| Enumerator |
|---|
| START_SERIAL_NUMBER | |
◆ FUObjectArray()
| FUObjectArray::FUObjectArray |
( |
| ) |
|
Constructor, initializes to no permanent object pool
◆ AddUObjectCreateListener()
Adds a new listener for object creation
- Parameters
-
| Listener | listener to notify when an object is deleted |
Adds a creation listener
- Parameters
-
| Listener | listener to notify when an object is deleted |
◆ AddUObjectDeleteListener()
Adds a new listener for object deletion
- Parameters
-
| Listener | listener to notify when an object is deleted |
Checks whether object is part of permanent object pool.
- Parameters
-
| Listener | listener to notify when an object is deleted |
◆ AllocateObjectPool()
| void FUObjectArray::AllocateObjectPool |
( |
int32 |
MaxUObjects, |
|
|
int32 |
MaxObjectsNotConsideredByGC, |
|
|
bool |
bPreAllocateObjectArray |
|
) |
| |
Allocates and initializes the permanent object pool
- Parameters
-
| MaxUObjects | maximum number of UObjects that can ever exist in the array |
| MaxObjectsNotConsideredByGC | number of objects in the permanent object pool |
◆ AllocateSerialNumber()
| int32 FUObjectArray::AllocateSerialNumber |
( |
int32 |
Index | ) |
|
Given a UObject index return the serial number. If it doesn't have a serial number, give it one. Threadsafe.
- Parameters
-
- Returns
- - the serial number for this UObject
◆ AllocateUObjectIndex()
Adds a uobject to the global array which is used for uobject iteration
- Parameters
-
| Object | Object to allocate an index for |
| InitialFlags | Flags to set in the object array before the object pointer becomes visible to other threads. |
| AlreadyAllocatedIndex | already allocated internal index to use, negative value means allocate a new index |
| SerialNumber | serial number to use |
◆ CloseDisregardForGC()
| void FUObjectArray::CloseDisregardForGC |
( |
| ) |
|
After the initial load, this closes the disregard pool so that new object are GC-able
◆ DisableDisregardForGC()
| void FUObjectArray::DisableDisregardForGC |
( |
| ) |
|
Disables the disregard for GC optimization.
◆ DisregardForGCEnabled()
| bool FUObjectArray::DisregardForGCEnabled |
( |
| ) |
const |
|
inline |
indicates if the disregard for GC optimization is active
- Returns
- true if MaxObjectsNotConsideredByGC is greater than zero; this indicates that the disregard for GC optimization is enabled
◆ DumpUObjectCountsToLog()
| void FUObjectArray::DumpUObjectCountsToLog |
( |
| ) |
const |
◆ FreeUObjectIndex()
Returns a UObject index top to the global uobject array
- Parameters
-
Returns a UObject index to the global uobject array
- Parameters
-
◆ GetAllocatedSize()
| SIZE_T FUObjectArray::GetAllocatedSize |
( |
| ) |
const |
|
inline |
◆ GetDeleteListenersAllocatedSize()
| SIZE_T FUObjectArray::GetDeleteListenersAllocatedSize |
( |
int32 * |
OutNumListeners = nullptr | ) |
const |
|
inline |
◆ GetFirstGCIndex()
Returns the index of the first object outside of the disregard for GC pool
◆ GetObjectArrayCapacity()
| int32 FUObjectArray::GetObjectArrayCapacity |
( |
| ) |
const |
|
inline |
Returns the estimated number of object indices available for allocation
◆ GetObjectArrayEstimatedAvailable()
| int32 FUObjectArray::GetObjectArrayEstimatedAvailable |
( |
| ) |
const |
|
inline |
Returns the estimated number of object indices available for allocation
◆ GetObjectArrayNum()
Returns the size of the global UObject array, some of these might be unused
- Returns
- the number of UObjects in the global array
◆ GetObjectArrayNumMinusAvailable()
| int32 FUObjectArray::GetObjectArrayNumMinusAvailable |
( |
| ) |
const |
|
inline |
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
- Returns
- The number of objects claimed
◆ GetObjectArrayNumMinusPermanent()
Returns the size of the global UObject array minus the number of permanent objects
- Returns
- the number of UObjects in the global array
◆ GetObjectArrayNumPermanent()
Returns the number of permanent objects
- Returns
- the number of permanent objects
◆ GetObjectItemArrayUnsafe() [1/2]
◆ GetObjectItemArrayUnsafe() [2/2]
| const TUObjectArray & FUObjectArray::GetObjectItemArrayUnsafe |
( |
| ) |
const |
|
inline |
◆ GetSerialNumber()
| int32 FUObjectArray::GetSerialNumber |
( |
int32 |
Index | ) |
|
|
inline |
Given a UObject index return the serial number. If it doesn't have a serial number, return 0. Threadsafe.
- Parameters
-
- Returns
- - the serial number for this UObject
◆ IndexToObject() [1/2]
Returns the UObject corresponding to index. Be advised this is only for very low level use.
- Parameters
-
| Index | index of object to return |
- Returns
- Object at this index
◆ IndexToObject() [2/2]
◆ IndexToObjectUnsafeForGC()
◆ IndexToValidObject()
◆ IsDisregardForGC()
Returns true if this object is "disregard for GC"...same results as the legacy RF_DisregardForGC flag
- Parameters
-
| Object | object to get for disregard for GC |
- Returns
- true if this object is disregard for GC
◆ IsIndexDisregardForGC()
Returns true if this object index is "disregard for GC"
- Parameters
-
| Index | object index to get for disregard for GC |
- Returns
- true if this object index is disregard for GC
◆ IsOpenForDisregardForGC()
| bool FUObjectArray::IsOpenForDisregardForGC |
( |
| ) |
const |
|
inline |
Returns true if the disregard for GC pool is open
◆ IsStale() [1/2]
◆ IsStale() [2/2]
| bool FUObjectArray::IsStale |
( |
int32 |
Index, |
|
|
bool |
bIncludingGarbage |
|
) |
| |
|
inline |
◆ IsValid() [1/3]
Checks if a UObject pointer is valid
- Parameters
-
| Object | object to test for validity |
- Returns
- true if this index is valid
Checks if a UObject index is valid
- Parameters
-
| Object | object to test for validity |
- Returns
- true if this index is valid
◆ IsValid() [2/3]
◆ IsValid() [3/3]
◆ IsValidIndex()
Checks if the object index is valid.
◆ LockInternalArray()
| void FUObjectArray::LockInternalArray |
( |
| ) |
const |
|
inline |
Locks the internal object array mutex
◆ LockUObjectDeleteListeners()
| void FUObjectArray::LockUObjectDeleteListeners |
( |
| ) |
|
|
inline |
Locks the mutex protecting the list of delete listeners
◆ ObjectToIndex()
Returns the index of a UObject. Be advised this is only for very low level use.
- Parameters
-
| Object | object to get the index of |
- Returns
- index of this object
◆ ObjectToObjectItem()
◆ OpenDisregardForGC()
| void FUObjectArray::OpenDisregardForGC |
( |
| ) |
|
If there's enough slack in the disregard pool, we can re-open it and keep adding objects to it
◆ RemoveObjectFromDeleteListeners()
| void FUObjectArray::RemoveObjectFromDeleteListeners |
( |
UObjectBase * |
Object | ) |
|
Removes an object from delete listeners
- Parameters
-
| Object | to remove from delete listeners |
◆ RemoveUObjectCreateListener()
Removes a listener for object creation
- Parameters
-
| Listener | listener to remove |
◆ RemoveUObjectDeleteListener()
Removes a listener for object deletion
- Parameters
-
| Listener | listener to remove |
removes a listener for object deletion
- Parameters
-
| Listener | listener to remove |
◆ ShutdownUObjectArray()
| void FUObjectArray::ShutdownUObjectArray |
( |
| ) |
|
Clears some internal arrays to get rid of false memory leaks
◆ UnlockInternalArray()
| void FUObjectArray::UnlockInternalArray |
( |
| ) |
const |
|
inline |
Unlocks the internal object array mutex
◆ UnlockUObjectDeleteListeners()
| void FUObjectArray::UnlockUObjectDeleteListeners |
( |
| ) |
|
|
inline |
Unlocks the mutex protecting the list of delete listeners
◆ StaticAllocateObject
| COREUOBJECT_API UObject * StaticAllocateObject |
( |
const UClass * |
, |
|
|
UObject * |
, |
|
|
FName |
, |
|
|
EObjectFlags |
, |
|
|
EInternalObjectFlags |
, |
|
|
bool |
, |
|
|
bool * |
, |
|
|
UPackage * |
, |
|
|
int32 |
, |
|
|
FRemoteObjectId |
, |
|
|
class FGCReconstructionGuard * |
|
|
) |
| |
|
friend |
Create a new instance of an object or replace an existing object. If both an Outer and Name are specified, and there is an object already in memory with the same Class, Outer, and Name, the existing object will be destructed, and the new object will be created in its place.
- Parameters
-
| Class | the class of the object to create |
| InOuter | the object to create this object within (the Outer property for the new object will be set to the value specified here). |
| Name | the name to give the new object. If no value (NAME_None) is specified, the object will be given a unique name in the form of ClassName_#. |
| SetFlags | the ObjectFlags to assign to the new object. some flags can affect the behavior of constructing the object. |
| InternalSetFlags | the InternalObjectFlags to assign to the new object. some flags can affect the behavior of constructing the object. |
| bCanReuseSubobjects | if set to true, SAO will not attempt to destroy a subobject if it already exists in memory. |
| bOutReusedSubobject | flag indicating if the object is a subobject that has already been created (in which case further initialization is not necessary). |
| ExternalPackage | External Package assigned to the allocated object, if any
|
| RemoteId | Globally unique id for this object |
| GCGuard | Special synchronization object that prevents GC from running when reconstructing an object on top of existing one |
- Returns
- a pointer to a fully initialized object of the specified class.
◆ UObject
The documentation for this class was generated from the following files: