Choose your operating system:
Windows
macOS
Linux
| FUObjectArray::FUObjectDeleteListener
|
Module |
|
Header |
/Engine/Source/Runtime/CoreUObject/Public/UObject/UObjectAnnotation.h |
Include |
#include "UObject/UObjectAnnotation.h" |
template<typename TAnnotation, bool bAutoRemove, int32 NumAnnotationsPerChunk>
class FUObjectAnnotationChunked : public FUObjectArray::FUObjectDeleteListener
FUObjectAnnotationChunked is a helper class that is used to store dense, fast and temporary, editor only, external or other tangential information about subsets of UObjects.
There is a notion of a default annotation and UObjects default to this annotation.
Annotations are automatically returned to the default when UObjects are destroyed. Annotation are not "garbage collection aware", so it isn't safe to store pointers to other UObjects in an annotation unless external guarantees are made such that destruction of the other object removes the annotation. The advantage of FUObjectAnnotationChunked is that it can reclaim memory if subsets of UObjects within predefined chunks no longer have any annotations associated with them.
Name | Description | |
---|---|---|
|
FUObjectAnnotationChunked() |
Constructor : Probably not thread safe |
Name | Description | |
---|---|---|
|
~FUObjectAnnotationChunked() |
Name | Description | ||
---|---|---|---|
|
AddAnnotation ( |
||
|
AddAnnotation ( |
Add an annotation to the annotation list. |
|
|
AddAnnotation ( |
||
|
AddAnnotation ( |
Add an annotation to the annotation list. |
|
|
TAnnotation ... |
AddOrGetAnnotation ( |
|
|
TAnnotation ... |
AddOrGetAnnotation ( |
Add an annotation to the annotation list. |
|
GetAllocatedSize() |
Returns the memory allocated by the internal array |
|
|
TAnnotation |
GetAnnotation ( |
Return the annotation associated with a uobject |
|
TAnnotation |
GetAnnotation ( |
Return the annotation associated with a uobject |
|
GetAnnotationCount() |
Return the number of elements in the array Thread safe, but you know, someone might have added more elements before this even returns |
|
|
GetMaxAllocatedSize() |
Returns the maximum memory allocated by the internal arrays |
|
|
GetMaxAnnottations() |
Return the number max capacity of the array Thread safe, but you know, someone might have added more elements before this even returns |
|
|
IsValidIndex ( |
Return if this index is valid Thread safe, if it is valid now, it is valid forever. |
|
|
NotifyUObjectDeleted ( |
Interface for FUObjectAllocator::FUObjectDeleteListener |
|
|
RemoveAllAnnotations() |
Removes all annotation from the annotation list. |
|
|
RemoveAnnotation ( |
Removes an annotation from the annotation list. |
|
|
RemoveAnnotation ( |
Removes an annotation from the annotation list. |
|
|
TrimAnnotations() |
Frees chunk memory from empty chunks. |
Name | Description | ||
---|---|---|---|
|
OnUObjectArrayShutdown() |
Called when UObject Array is being shut down, this is where all listeners should be removed from it |