Keep only 1 Dispose implementation
authorMarek Safar <marek.safar@gmail.com>
Mon, 25 Oct 2010 17:45:26 +0000 (18:45 +0100)
committerMarek Safar <marek.safar@gmail.com>
Mon, 25 Oct 2010 17:55:05 +0000 (18:55 +0100)
mcs/class/corlib/System.Threading/WaitHandle.cs

index fa1804c080627b522cb5213d31fd2a5795b0d59d..0c4daaf09ad5d71e60c3dca93d76f7f104140117 100644 (file)
@@ -215,10 +215,12 @@ namespace System.Threading
 
 #if NET_4_0
                public void Dispose ()
+#else          
+               void IDisposable.Dispose ()
+#endif
                {
                        Close ();
                }
-#endif
 
                public const int WaitTimeout = 258;
 
@@ -402,12 +404,6 @@ namespace System.Threading
                protected static readonly IntPtr InvalidHandle = (IntPtr) (-1);
                bool disposed = false;
 
-               void IDisposable.Dispose() {
-                       Dispose(true);
-                       // Take yourself off the Finalization queue
-                       GC.SuppressFinalize(this);
-               }
-               
                ~WaitHandle() {
                        Dispose(false);
                }