AnnotationStore.Dispose Method

Definition

Releases resources used by the store.

Overloads

Dispose()

Releases all managed and unmanaged resources used by the store.

Dispose(Boolean)

Releases the unmanaged resources used by the store and optionally releases the managed resources.

Dispose()

Releases all managed and unmanaged resources used by the store.

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

Implements

Remarks

Applications should call Dispose when finished with the AnnotationStore. After calling Dispose the application can release all references to the AnnotationStore to allow the garbage collector to reclaim the memory that the AnnotationStore was occupying. For more information, see Cleaning Up Unmanaged Resources and Implementing a Dispose Method.

The public Dispose method calls the protected Dispose(Boolean) method with the disposing parameter of true to release all managed and unmanaged resources.

Note

Call Dispose before the last reference to the AnnotationStore is released. If Dispose is not called, AnnotationStore resources will not be freed until the garbage collector calls the store's Finalize method.

See also

Dispose(Boolean)

Releases the unmanaged resources used by the store 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 protected Dispose method is called by the public Dispose and Finalize methods. The public Dispose invokes the protected Dispose(Boolean) method with the disposing parameter set to true. Finalize invokes Dispose with disposing set to false.

When the disposing parameter is true, Dispose releases all resources held by any managed objects that the AnnotationStore references. Dispose also invokes the Dispose() method of each referenced object.

Notes to Inheritors

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

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

Applies to