-
TArray
- - Fast element iteration.
- memory efficient.
-
Reserve
- InAllocator::SizeType Number
-
RemoveAtSwap
- At index
-
RemoveSwap
- At element's index
-
RemoveSingleSwap
- At first occuring element's index
- All allocator policies are currently
using SizeType = int32;
-
TSet
- - Order is irrelevant.
- O(1) (very fast) in adding, finding, and removing elements at the cost of having slightly less memory savings like TArray.
- unique elements only (usually. Can be changed with second template parameter 'KeyFuncs')
-
Reserve
- int32 Number
- Reset
- @todo Hash
-
TMap
- TSet<ElementType, KeyFuncs, SetAllocator>
- ...
-
Actor.h
line 86
TInlineComponentArray
-
TInlineComponentArray : public
TArray<T, TInlineAllocator<NumElements>>
- class T
- uint32 NumElements = NumInlinedActorComponents // 24
-
Has optional template argument specifying the allocator policy
'typename InAllocator = FDefaultAllocator'
You can sometimes improve performance by simply changing the allocator policy
-
TInlineAllocator
- uint32 NumInlineElements
- typename SecondaryAllocator = FDefaultAllocator
-
TNonRelocatableInlineAllocator
- uint32 NumInlineElements
-
TFixedAllocator
- uint32 NumInlineElements
- The reflection system (UPROPERTY) currently doesn't support any container class using non-default allocator types.
-
Optional template argument specifying the
set allocator policy
'typename SetAllocator = FDefaultSetAllocator'
Tells how many hash buckets should be used
- Want to create your own set allocator policy?
Inherit from TSetAllocator
(Containers/ContainerAllocationPolicies.h)
- TSet uses special 'set' allocators. TInlineAllocator, TFixedAllocator, etc. cannot be used
-
Optional template argument specifying
KeyFuncs
'typename KeyFuncs = DefaultKeyFuncs<ElementType>'
Defines how elements are searched, compared, and hashed
- Want to create your own KeyFuncs?
Inherit from BaseKeyFuncs
(Containers/Set.h)
- Want to create your own allocator policy?
Take a look at FContainerAllocatorInterface
(Containers/ContainerAllocationPolicies.h)
It solely exists for documenting most things you need to know.