コード例 #1
0
        public override void OnTrimMemory([GeneratedEnum] TrimMemory level)
        {
            base.OnTrimMemory(level);
            System.Diagnostics.Debug.WriteLine($"{Class.SimpleName} OnTrimMemory {level.ToString()}");

            BizLogic.SaveInstanceState();
        }
コード例 #2
0
        public override void OnTrimMemory([GeneratedEnum] TrimMemory level)
        {
            base.OnTrimMemory(level);

            System.Diagnostics.Debug.WriteLine("OnTrimMemory - " + level.ToString());

            if (level == TrimMemory.RunningCritical)
            {
                memCritical = true;
                var        activityManager = Android.App.Application.Context.GetSystemService(Context.ActivityService) as ActivityManager;
                MemoryInfo memInfo         = new MemoryInfo();
                activityManager.GetMemoryInfo(memInfo);
                avaialToTotalThreshold = (float)memInfo.AvailMem / memInfo.TotalMem;
            }
        }
コード例 #3
0
 public override void OnTrimMemory(TrimMemory level)
 {
     base.OnTrimMemory(level);
     notify($"OnTrimMemory {level.ToString()}");
 }