Esempio n. 1
0
 /// <summary>
 /// Overrides this method if want to handle behavior when the system memory is low.
 /// If base.OnLowMemory() is not called, the event 'LowMemory' will not be emitted.
 /// </summary>
 /// <param name="e">The low memory event argument</param>
 /// <since_tizen> 3 </since_tizen>
 protected virtual void OnLowMemory(LowMemoryEventArgs e)
 {
     LowMemory?.Invoke(this, e);
     sTimer           = new Timer(new Random().Next(10 * 1000));
     sTimer.Elapsed  += OnTimedEvent;
     sTimer.AutoReset = false;
     sTimer.Enabled   = true;
 }
Esempio n. 2
0
        /// <summary>
        /// Overrides this method if want to handle behavior when the system memory is low.
        /// If base.OnLowMemory() is not called, the event 'LowMemory' will not be emitted.
        /// </summary>
        /// <param name="e">The low memory event argument</param>
        /// <since_tizen> 3 </since_tizen>
        protected virtual void OnLowMemory(LowMemoryEventArgs e)
        {
            LowMemory?.Invoke(this, e);
            double interval = new Random().Next(10 * 1000);

            if (interval <= 0)
            {
                interval = 10 * 1000;
            }

            sTimer           = new Timer(interval);
            sTimer.Elapsed  += OnTimedEvent;
            sTimer.AutoReset = false;
            sTimer.Enabled   = true;
        }
Esempio n. 3
0
 /// <summary>
 /// Overrides this method if want to handle behavior when the system memory is low.
 /// If base.OnLowMemory() is not called, the event 'LowMemory' will not be emitted.
 /// </summary>
 /// <param name="e">The low memory event argument</param>
 /// <since_tizen> 3 </since_tizen>
 protected virtual void OnLowMemory(LowMemoryEventArgs e)
 {
     LowMemory?.Invoke(this, e);
     System.GC.Collect();
 }
Esempio n. 4
0
 /// <summary>
 /// This method is to handle behavior when the system memory is low.
 /// </summary>
 /// <param name="e">The low memory event argument</param>
 /// <since_tizen> 10 </since_tizen>
 public virtual void OnLowMemory(LowMemoryEventArgs e)
 {
 }