示例#1
0
 /// <include file='doc\WaitHandle.uex' path='docs/doc[@for="WaitHandle.Dispose"]/*' />
 protected virtual void Dispose(bool explicitDisposing)
 {
     if (waitHandle != InvalidHandle)
     {
         lock (this)
         {
             if (waitHandle != InvalidHandle)
             {
                 IntPtr copyOfHandle = waitHandle;
                 waitHandle = InvalidHandle;
                 Win32Native.CloseHandle(copyOfHandle);
             }
         }
     }
 }
示例#2
0
 protected internal override void FreeHandle(IntPtr handle)
 {
     // TODO: After RTM consider checking CloseHandle's return value.
     Win32Native.CloseHandle(handle);
 }