Vector.TrimToSize Method

Definition

Trims the capacity of this vector to be the vector's current size.

C#
[Android.Runtime.Register("trimToSize", "()V", "GetTrimToSizeHandler")]
public virtual void TrimToSize ();
Attributes

Remarks

Trims the capacity of this vector to be the vector's current size. If the capacity of this vector is larger than its current size, then the capacity is changed to equal the size by replacing its internal data array, kept in the field elementData, with a smaller one. An application can use this operation to minimize the storage of a vector.

Java documentation for java.util.Vector.trimToSize().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Product Versions
.NET for Android .NET for Android API 34, .NET for Android API 35

See also