DocumentTask::Dispose Method ()

 

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)

public:
virtual void Dispose() sealed

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: