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

Timer.Dispose Method (WaitHandle)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Releases all resources used by the current instance of Timer and signals when the timer has been disposed of.

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

'Declaration
Public Function Dispose ( _
	notifyObject As WaitHandle _
) As Boolean

Parameters

notifyObject
Type: System.Threading.WaitHandle
The WaitHandle to be signaled when the timer has been disposed of.

Return Value

Type: System.Boolean
true if the function succeeds; otherwise, false.

ExceptionCondition
ArgumentNullException

The notifyObject parameter is Nothing.

Calling Dispose makes the resources that are used by the Timer eligible to be reallocated for other purposes.

When this method completes, it signals the WaitHandle specified by the notifyObject parameter. Use this overload of the Dispose method if you want to be able to block until you are certain that the timer has been disposed.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft