Dispose Method (Boolean)
Collapse the table of content
Expand the table of content

WaitHandle::Dispose Method (Boolean)

 

When overridden in a derived class, releases the unmanaged resources used by the WaitHandle, and optionally releases the managed resources.

Namespace:   System.Threading
Assembly:  mscorlib (in mscorlib.dll)

protected:
virtual void Dispose(
	bool explicitDisposing
)

Parameters

explicitDisposing
Type: System::Boolean

true to release both managed and unmanaged resources; false to release only unmanaged resources.

This method is called by the Close and the Dispose() methods with the explicitDisposing parameter set to true. When the explicitDisposing parameter is true, this method releases all resources held by any managed objects that this WaitHandle object references.

Notes to Inheritors:

You should override the Dispose(Boolean) method to release resources allocated in derived classes.

The Close or Dispose() method can be called multiple times by other objects. When overriding this method, be careful not to reference objects that have been previously disposed in an earlier call to Dispose or Close.

Universal Windows Platform
Available since 4.5
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2016 Microsoft