Share via


TraceDebugLogFile.Dispose Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Releases all resources used by the current instance of the TraceDebugLogFile class.

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

Syntax

'Declaration
Public Overrides Sub Dispose
'Usage
Dim instance As TraceDebugLogFile

instance.Dispose()
public override void Dispose()
public:
virtual void Dispose() override
abstract Dispose : unit -> unit 
override Dispose : unit -> unit 
public override function Dispose()

Implements

IDisposable.Dispose()

Remarks

Call Dispose when you are finished using the TraceDebugLogFile. The Dispose method leaves the TraceDebugLogFile in an unusable state. After calling Dispose, you must release all references to the TraceDebugLogFile so the garbage collector can reclaim the memory that the TraceDebugLogFile 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 TraceDebugLogFile. Otherwise, the resources it is using will not be freed until the garbage collector calls the TraceDebugLogFile object's Finalize method.

.NET Framework Security

See Also

Reference

TraceDebugLogFile Class

TraceDebugLogFile Members

Microsoft.VisualStudio.TraceLog Namespace