다음을 통해 공유


Vector.TrimToSize Method

Definition

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

[Android.Runtime.Register("trimToSize", "()V", "GetTrimToSizeHandler")]
public virtual void TrimToSize ();
[<Android.Runtime.Register("trimToSize", "()V", "GetTrimToSizeHandler")>]
abstract member TrimToSize : unit -> unit
override this.TrimToSize : unit -> unit
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

See also