void HandleMemoryWarningDelegate() { #if DEBUG Debug.WriteLine("CameraController - DidReceiveMemoryWarning - HandleMemoryWarningDelegate"); #endif memoryWarningDelegate = null; NSUrlCache.SharedCache.RemoveAllCachedResponses(); GC.SuppressFinalize(this); GC.Collect(); UIAlertView alert1 = new UIAlertView(@"Warning", @"Not enough memory to load any more photos, please Submit inspection ", null, NSBundle.MainBundle.LocalizedString("OK", "OK")); alert1.Show(); DismissViewControllerAsync(false); }
public CameraController() { memoryWarningDelegate = HandleMemoryWarningDelegate; // make this a single instance to help memory leak #if DEBUG Debug.WriteLine("CameraController - Constructor"); #endif mediaController = new MediaController(); mediaController.Canceled += (object sender, EventArgs e) => { this.DismissModalViewController(false); }; }
public UICameraController(IntPtr handle) : base(handle) { memoryWarningDelegate = HandleMemoryWarningDelegate; }