WaitHandle.Close Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Releases all resources held by the current WaitHandle.
public:
virtual void Close();
public virtual void Close ();
abstract member Close : unit -> unit
override this.Close : unit -> unit
Public Overridable Sub Close ()
This method is the public implementation of the IDisposable.Dispose method for the WaitHandle class and its derived classes. It provides a standard implementation that calls the Dispose(Boolean)
overload with a true
argument and then calls the GC.SuppressFinalize method. Call this method to release all resources held by an instance of WaitHandle
or a derived class.
Once this method is called, references to the current instance cause undefined behavior.
Napomena
Always call Close or Dispose() before you release your last reference to the WaitHandle. Otherwise, the resources it is using will not be freed.
You should override the Dispose(Boolean)
method to release resources allocated in derived classes.
Proizvod | Verzije |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
Povratne informacije o proizvodu .NET
.NET je projekt otvorenog koda. Odaberite vezu za slanje povratnih informacija: