Breyta

Deila með


SearchResultCollection.Dispose Method

Definition

Releases all resources that are used by the SearchResultCollection object.

Overloads

Dispose()

Releases all resources that are used by the SearchResultCollection object.

Dispose(Boolean)

Releases the unmanaged resources that are used by the SearchResultCollection object and optionally releases the managed resources.

Dispose()

Source:
SearchResultCollection.cs
Source:
SearchResultCollection.cs
Source:
SearchResultCollection.cs
Source:
SearchResultCollection.cs

Releases all resources that are used by the SearchResultCollection object.

public:
 virtual void Dispose();
public void Dispose ();
abstract member Dispose : unit -> unit
override this.Dispose : unit -> unit
Public Sub Dispose ()

Implements

Remarks

The Dispose method, it allows the resources that are used by the SearchResultCollection to be reallocated for other purposes. For more information about Dispose, see Cleaning Up Unmanaged Resources.

The garbage collector does not release memory for a SearchResultCollection object. Therefore, an application must call the Dispose method explicitly to prevent a memory leak.

Applies to

Dispose(Boolean)

Source:
SearchResultCollection.cs
Source:
SearchResultCollection.cs
Source:
SearchResultCollection.cs
Source:
SearchResultCollection.cs

Releases the unmanaged resources that are used by the SearchResultCollection object and optionally releases the managed resources.

protected:
 virtual void Dispose(bool disposing);
protected virtual void Dispose (bool disposing);
abstract member Dispose : bool -> unit
override this.Dispose : bool -> unit
Protected Overridable Sub Dispose (disposing As Boolean)

Parameters

disposing
Boolean

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

Remarks

This method is called by the public Dispose method and the Finalize() method, if it has been overridden. Dispose invokes the protected Dispose method with the disposing parameter set to true. Finalize invokes Dispose with the disposing parameter set to false.

When the disposing parameter is true, this method releases all resources that are held by any managed objects that this SearchResultCollection references.

The garbage collector does not release memory for a SearchResultCollection object. Therefore, you must call the Dispose method explicitly to prevent a memory leak.

This method invokes the Dispose method of each object in the collection.

For more information about Dispose() and Finalize, see Cleaning Up Unmanaged Resources and Overriding the Finalize Method.

Notes to Inheritors

The Dispose() method can be called multiple times by other objects. When overriding the Dispose(Boolean) method be careful not to reference objects that have been previously disposed of in an earlier call to the Dispose() method. For more information about how to implement Dispose(), see Implementing a Dispose Method.

Applies to