예제 #1
0
 public static void Drop()
 {
     if (_cached != null)
     {
         _cached.Dispose();
         _cached = null;
     }
 }
예제 #2
0
        private void CleanupTimerOnElapsed(object sender, ElapsedEventArgs elapsedEventArgs)
        {
            _cleanupTimer.Elapsed -= CleanupTimerOnElapsed;
            if (_report != null)
            {
                _report.Dispose();
                _report = null;
            }
            if (_screenshotClient != null)
            {
                _screenshotClient.Dispose();
                _screenshotClient = null;
            }
            if (_ctx != null)
            {
                _ctx.Dispose();
                _ctx = null;
            }

            _cleanupTimer.Dispose();
            _cleanupTimer = null;
        }