TextTransformation.Dispose Method

Releases all resources used by the TextTransformation.

Namespace:  Microsoft.VisualStudio.TextTemplating
Assembly:  Microsoft.VisualStudio.TextTemplating (in Microsoft.VisualStudio.TextTemplating.dll)

Syntax

'宣言
Public Sub Dispose
'使用
Dim instance As TextTransformation

instance.Dispose()
public void Dispose()
public:
virtual void Dispose() sealed
public final function Dispose()

Implements

IDisposable.Dispose()

Remarks

Called by user code. This method calls Dispose(Boolean) with the argument true, and suppresses finalization by the garbage collector.

Classes that derive from TextTransformation should override Dispose(Boolean) to release their unmanaged resources.

Call Dispose when you are finished using the TextTransformation. The Dispose method leaves the TextTransformation in an unusable state. After calling Dispose, you must release all references to the TextTransformation so the garbage collector can reclaim the memory that the TextTransformation was occupying. For more information, see Cleaning Up Unmanaged Resources and Implementing a Dispose Method.

注意

Always call Dispose before you release your last reference to the TextTransformation. Otherwise, the resources it is using will not be freed until the garbage collector calls the TextTransformation object's Finalize method.

Permissions

See Also

Concepts

Implementing a Dispose Method

Cleaning Up Unmanaged Resources

Reference

TextTransformation Class

TextTransformation Members

Dispose Overload

Microsoft.VisualStudio.TextTemplating Namespace

IDisposable

Finalize