Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Containers > API/Runtime/Core/Containers/TSparseArray
Syntax
&42; Frame2: Add(A) -> [1]
Remarks
Sort the free element list so that subsequent allocations will occur in the lowest available position resulting in tighter packing without moving any existing items. This also means that assigned indices no longer depend on the order in which old items were removed, making it easier to use the container when determinism is required (without a container reset).
E.g., call SortFreeList() each frame to make the container assign the same indices when we perform the following operations: Frame1: Add(A) -> [0]; Add(B) -> [1]; Remove(A); Remove(B); (Free list is now {[1],[0],...}) /**