

There are a number of different allocators you can use if you decide that the default behavior is not for you, or you can write your own. It defines how the objects are laid out in memory and how the array should grow to accommodate more elements. The allocator is quite frequently omitted and will default to one which is appropriate for most use cases. TArray is what is called a homogenous container, meaning that all of its elements are strictly the same type you cannot store elements of different types in a single TArray.

The element type is the type of the objects that will be stored in the array. TArray types are defined by two properties: Element type, and an optional allocator. TArray is the most common container class within UE4. As a TArray is a sequence, its elements have a well-defined order and its functions are used to deterministically manipulate those objects and their order. TArray is responsible for the ownership and organization of a sequence of other objects (called "elements") of the same type. The simplest container class in Unreal Engine 4 (UE4) is TArray.
