IosMemoryPressure

class IosMemoryPressure(notificationCenter: NSNotificationCenter = NSNotificationCenter.defaultCenter) : MemoryPressureProvider(source)

Implementation of MemoryPressure for iOS.

In the iOS system, NSNotificationCenter is used to monitor memory pressure states.

| iOS Notification                        | MemoryPressureLevel   |
|:----------------------------------------|:----------------------|
| UIApplicationDidEnterBackground         | Low                   |
| UIApplicationDidReceiveMemoryWarning    | Critical              |

Constructors

Link copied to clipboard
constructor(notificationCenter: NSNotificationCenter = NSNotificationCenter.defaultCenter)

Functions

Link copied to clipboard
open override fun addListener(listener: Listener<MemoryPressureLevel>)
Link copied to clipboard
fun <E> Listenable<E>.asFlow(): Flow<E>

Converts this Listenable into a Flow that emits events.

Link copied to clipboard
Link copied to clipboard
open override fun notify(event: MemoryPressureLevel)
Link copied to clipboard
open override fun removeListener(listener: Listener<MemoryPressureLevel>)