DocumentTask::Dispose Method (Boolean)

 

Recovers resources just before the DocumentTask object is destroyed.

Namespace:   Microsoft.VisualStudio.Package
Assembly:  Microsoft.VisualStudio.Package.LanguageService.14.0 (in Microsoft.VisualStudio.Package.LanguageService.14.0.dll)

protected:
virtual void Dispose(
	bool disposing
)

Parameters

disposing
Type: System::Boolean

true if disposing the object just before destruction; otherwise, false.

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

Call M:Namespace.Class.Dispose when you are finished using the DocumentTask. The M:Namespace.Class.Dispose method leaves the DocumentTask in an unusable state. After you call M:Namespace.Class.Dispose, 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.

System_CAPS_noteNote

Always call M:Namespace.Class.Dispose 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.

Return to top
Show: