Share via


Dispose Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Releases all resources used by the current instance of Timer.

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

Syntax

'Declaration
Public Sub Dispose
public void Dispose()
public:
virtual void Dispose() sealed
abstract Dispose : unit -> unit 
override Dispose : unit -> unit 
public final function Dispose()

Implements

IDisposable. . :: . .Dispose() () () ()

Remarks

Calling Dispose allows the resources used by the Timer to be reallocated for other purposes.

Note

Callbacks can occur after the Dispose()()()() method overload has been called, because the timer queues callbacks for execution by thread pool threads. You can use the Dispose(WaitHandle) method overload to wait until all callbacks have completed.

.NET Framework Security

See Also

Reference

Timer Class

System.Threading Namespace