다음을 통해 공유


LruCache.TrimToSize(Int32) Method

Definition

Remove the eldest entries until the total of remaining entries is at or below the requested size.

[Android.Runtime.Register("trimToSize", "(I)V", "GetTrimToSize_IHandler")]
public virtual void TrimToSize (int maxSize);
[<Android.Runtime.Register("trimToSize", "(I)V", "GetTrimToSize_IHandler")>]
abstract member TrimToSize : int -> unit
override this.TrimToSize : int -> unit

Parameters

maxSize
Int32

the maximum size of the cache before returning. May be -1 to evict even 0-sized elements.

Attributes

Remarks

Remove the eldest entries until the total of remaining entries is at or below the requested size.

Java documentation for android.util.LruCache.trimToSize(int).

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