다음을 통해 공유


ArrayList.TrimToSize Method

Definition

Trims the capacity of this ArrayList instance to be the list'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 ArrayList instance to be the list's current size. An application can use this operation to minimize the storage of an ArrayList instance.

Java documentation for java.util.ArrayList.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