<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIApplicationDelegate/applicationDidReceiveMemoryWarning(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIApplicationDelegate(im)applicationDidReceiveMemoryWarning:"
  },
  "title" : "applicationDidReceiveMemoryWarning(_:)"
}
-->

# applicationDidReceiveMemoryWarning(_:)

Tells the delegate when the app receives a memory warning from the system.

```
optional func applicationDidReceiveMemoryWarning(_ application: UIApplication)
```

## Parameters

`application`

Your singleton app object.

## Discussion

Your implementation of this method should free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. You use this method in conjunction with the [`didReceiveMemoryWarning()`](/documentation/UIKit/UIViewController/didReceiveMemoryWarning()) of the [`UIViewController`](/documentation/UIKit/UIViewController) class and the [`didReceiveMemoryWarningNotification`](/documentation/UIKit/UIApplication/didReceiveMemoryWarningNotification) notification to release memory throughout your app.

It is strongly recommended that you implement this method. If your app does not release enough memory during low-memory conditions, the system may terminate it outright.

## See Also

[`didReceiveMemoryWarning()`](/documentation/UIKit/UIViewController/didReceiveMemoryWarning())

Sent to the view controller when the app receives a memory warning.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)