Unity Engine documentationScript ReferenceUnity.CollectionsNativeList<T>TrimExcess()Sets the capacity to match the length.Read time 1 minuteLast updated 12 days agoDefinition Type: Method Namespace: Unity.Collections Assembly: UnityEngine.ManagedKernelModule public void TrimExcess()