UIViewController.DidReceiveMemoryWarning Method

Definition

Called when the system is running low on memory.

C#
[Foundation.Export("didReceiveMemoryWarning")]
public virtual void DidReceiveMemoryWarning();
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:

C#
public override void DidReceiveMemoryWarning ()
{
    photoMap.Clear ();
    View = null;
    photoImageView = null;
    toolbar = null;
    syncIsNeeded = true;
    base.DidReceiveMemoryWarning();
}

Applies to

Producto Versiones
Xamarin iOS SDK 12

See also