ResourceSet.Dispose Method

Definition

Releases resources used by the current ResourceSet instance.

Overloads

Dispose()

Disposes of the resources (other than memory) used by the current instance of ResourceSet.

Dispose(Boolean)

Releases resources (other than memory) associated with the current instance, closing internal managed objects if requested.

Dispose()

Source:
ResourceSet.cs
Source:
ResourceSet.cs
Source:
ResourceSet.cs

Disposes of the resources (other than memory) used by the current instance of ResourceSet.

C#
public void Dispose();

Implements

Remarks

Call Dispose when you are finished using the ResourceSet. The Dispose method leaves the ResourceSet in an unusable state. After calling Dispose, you must release all references to the ResourceSet so the memory it was occupying can be reclaimed by garbage collection.

Note

The current method is the implementation of IDisposable.Dispose. This implementation calls Dispose (true).

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.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

Dispose(Boolean)

Source:
ResourceSet.cs
Source:
ResourceSet.cs
Source:
ResourceSet.cs

Releases resources (other than memory) associated with the current instance, closing internal managed objects if requested.

C#
protected virtual void Dispose(bool disposing);

Parameters

disposing
Boolean

Indicates whether the objects contained in the current instance should be explicitly closed.

Remarks

If the dispose parameter is true, the current method frees all the resources associated with it as well as with all objects associated with it. If dispose is false, the current method frees only the resources allocated to it, and ignores any objects associated with it.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.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