次の方法で共有


DocumentTask.Dispose Method

Definition

Overloads

Dispose()

Recovers resources just before the DocumentTask object is destroyed.

Dispose(Boolean)

Recovers resources just before the DocumentTask object is destroyed.

Dispose()

Recovers resources just before the DocumentTask object is destroyed.

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

Implements

Remarks

Call <xref:Namespace.Class.Dispose%2A> when you are finished using the DocumentTask. The <xref:Namespace.Class.Dispose%2A> method leaves the DocumentTask in an unusable state. After you call <xref:Namespace.Class.Dispose%2A>, you must release all references to the DocumentTask so that the garbage collector can reclaim the memory that the DocumentTask was occupying. For more information, see Cleaning Up Unmanaged Resources and Implementing a Dispose Method.

Note

Always call <xref:Namespace.Class.Dispose%2A> before you release the last reference to the DocumentTask. Otherwise, the resources it is using will not be freed until the garbage collector calls the Finalize method on the DocumentTask object.

Applies to

Dispose(Boolean)

Recovers resources just before the DocumentTask object is destroyed.

protected:
 virtual void Dispose(bool disposing);
protected:
 virtual void Dispose(bool disposing);
 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 if disposing the object just before destruction; otherwise, false.

Remarks

The base method clears the text line marker and site objects.

Call <xref:Namespace.Class.Dispose%2A> when you are finished using the DocumentTask. The <xref:Namespace.Class.Dispose%2A> method leaves the DocumentTask in an unusable state. After you call <xref:Namespace.Class.Dispose%2A>, you must release all references to the DocumentTask so that the garbage collector can reclaim the memory that the DocumentTask was occupying. For more information, see Cleaning Up Unmanaged Resources and Implementing a Dispose Method.

Note

Always call <xref:Namespace.Class.Dispose%2A> before you release the last reference to the DocumentTask. Otherwise, the resources it is using will not be freed until the garbage collector calls the Finalize method on the DocumentTask object.

Applies to