Fragment.OnTrimMemory(TrimMemory) Fragment.OnTrimMemory(TrimMemory) Method


Called when the operating system has determined that it is a good time for a process to trim unneeded memory from its process.

[Android.Runtime.Register("onTrimMemory", "(I)V", "GetOnTrimMemory_IHandler")]
public virtual void OnTrimMemory (Android.Content.TrimMemory level);
abstract member OnTrimMemory : Android.Content.TrimMemory -> unit
override this.OnTrimMemory : Android.Content.TrimMemory -> unit


TrimMemory TrimMemory

The context of the trim, giving a hint of the amount of trimming the application may like to perform. May be TrimMemoryComplete, TrimMemoryModerate, TrimMemoryBackground, TrimMemoryUiHidden, TrimMemoryRunningCritical, TrimMemoryRunningLow, or TrimMemoryRunningModerate.



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