LogRecord.Dispose Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Releases all resources used by the LogRecord.
public:
abstract void Dispose();
public abstract void Dispose ();
abstract member Dispose : unit -> unit
Public MustOverride Sub Dispose ()
Implements
Remarks
You should call this method when you finish using the LogRecord instance. The Dispose method leaves the LogRecord instance in an unusable state. After calling this method, you must release all references to the LogRecord instance, so that the garbage collector can reclaim the memory that the LogRecord instance was occupying.
Note
Always call Dispose before you release your last reference to the LogRecord instance. Otherwise, the resources it is using cannot be freed until the garbage collector calls the LogRecord instance's Finalize
method.