Struct MemoryLevel
sealed struct MemoryLevel
Represents different memory levels that application components may be notified of.
Components take different actions depending on the reported MemoryLevel.
Fields
Constants
MEMORY_LEVEL_APP_BACKGROUND
Indicates that the process has no visible UI and must free all UI-related resources.MemoryLevel={"APP_BACKGROUND"}
MEMORY_LEVEL_APP_COMPLETE
Indicates that the process must free maximum resources to avoid termination.MemoryLevel={"APP_COMPLETE"}
MEMORY_LEVEL_DEVICE_MODERATE
Indicates that the device may soon become low on resources. The app process is not suspended, but should reduce resource consumption to avoid device UX impact and maintain device health.MemoryLevel={"DEVICE_MODERATE"}
MEMORY_LEVEL_DEVICE_LOW
Indicates that the device is low on resources. The app process is not suspended, but must reduce resource consumption to avoid device UX impact and risk of app termination.MemoryLevel={"DEVICE_LOW"}
MEMORY_LEVEL_DEVICE_CRITICAL
Indicates that the device is critically low on resources. The app process is not suspended, but must immediately reduce resource consumption to avoid UX impact and risk of imminent app termination.MemoryLevel={"DEVICE_CRITICAL"}

