UIViewController.DidReceiveMemoryWarning Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called when the system is running low on memory.
[Foundation.Export("didReceiveMemoryWarning")]
public virtual void DidReceiveMemoryWarning ();
abstract member DidReceiveMemoryWarning : unit -> unit
override this.DidReceiveMemoryWarning : unit -> unit
- Attributes
Remarks
This method is automatically called when the system is running low on memory. Application developers who override this method in order to release resources must call base.DidReceiveMemoryWarning()
, as shown in the following code, taken from the “Media Notes” sample:
public override void DidReceiveMemoryWarning ()
{
photoMap.Clear ();
View = null;
photoImageView = null;
toolbar = null;
syncIsNeeded = true;
base.DidReceiveMemoryWarning();
}