protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                lock (lockObject)
                {
                    Stop();

                    clock.Dispose();

                    disposed = true;

                    GC.SuppressFinalize(this);
                }
            }
        }
Beispiel #2
0
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                Console.WriteLine("6-before lock in Dispose");

                lock (lockObject)
                {
                    Console.WriteLine("6-In lock in Dispose");
                    Stop();

                    clock.Dispose();

                    disposed = true;

                    GC.SuppressFinalize(this);
                }
                Console.WriteLine("6-After lock in Dispose");
            }
        }