TextTransformation.Dispose Method ()

 

Releases all resources used by the TextTransformation.

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

public void Dispose()

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.

System_CAPS_noteNote

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.

Return to top
Show: