PooledList<T>.

TrimExcess() Method

Summary

Sets the capacity of this list to the size of the list. This method can be used to minimize a list's memory overhead once it is known that no new elements will be added to the list. To completely clear a list and release all memory referenced by the list, execute the following statements:
list.Clear();
list.TrimExcess();
Namespace
Avalonia.Collections.Pooled
Containing Type
PooledList<T>

Syntax

public void TrimExcess()

Return Value

Type Description
void