Share via


TextTransformation.Dispose Method

Releases all resources used by the TextTransformation.

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

Syntax

'Declaration
Public Sub Dispose
public void Dispose()
public:
virtual void Dispose() sealed
abstract Dispose : unit -> unit  
override Dispose : unit -> unit
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.

Note

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.

.NET Framework Security

See Also

Reference

TextTransformation Class

Dispose Overload

Microsoft.VisualStudio.TextTemplating Namespace

IDisposable

Finalize

Other Resources

Implementing a Dispose Method

Cleaning Up Unmanaged Resources