Прочетете на английски Редактиране

Споделяне чрез


DbDataSource.Dispose Method

Definition

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.

Overloads

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

Dispose(Boolean)

Called by the Dispose() and Finalize() methods to release the managed and unmanaged resources used by the current instance of the DbDataSource class.

Dispose()

Source:
DbDataSource.cs
Source:
DbDataSource.cs
Source:
DbDataSource.cs

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

C#
public void Dispose();

Implements

Remarks

If the current instance of DbDataSource represents a connection pool, disposing it should close all idle connections, and arrange for busy connections to be closed as soon as possible.

Applies to

.NET 10 и други версии
Продукт Версии
.NET 7, 8, 9, 10

Dispose(Boolean)

Source:
DbDataSource.cs
Source:
DbDataSource.cs
Source:
DbDataSource.cs

Called by the Dispose() and Finalize() methods to release the managed and unmanaged resources used by the current instance of the DbDataSource class.

C#
protected virtual void Dispose(bool disposing);

Parameters

disposing
Boolean

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

Remarks

This method is meant to be overridden by implementing ADO.NET providers, and is not a user-facing API.

Applies to

.NET 10 и други версии
Продукт Версии
.NET 7, 8, 9, 10