MemoryMonitor

public class MemoryMonitor : BaseNotificationMonitor

A MemoryMonitor instance monitors the app for memory warnings from the operating system.

  • Encapsulates warnings received by the app from the operating system about low memory availability.

    See more

    Declaration

    Swift

    public enum Event
  • Initializes a new MemoryMonitor.

    Declaration

    Swift

    public init(queue: OperationQueue = .main,
                handler: @escaping (Event) -> Void)

    Parameters

    queue

    The operation queue on which the handler executes. By default, the main operation queue is used.

    handler

    The handler to call when the app receives a warning from the operating system about low memory availability.

  • Declaration

    Swift

    override public func addNotificationObservers()