Called when the object is about to be reclaimed by garbage collection.
[Visual Basic] Overrides Protected Sub Finalize() [C#] protected override void Finalize(); [C++] protected: override void Finalize(); [JScript] protected override function Finalize();
Exception Type | Condition |
---|---|
Win32Exception | The event log's read handle is not released successfully.
-or- The event log's write handle is not released successfully. |
Open resources are closed and the System.Component.Dispose() method is called. The process to close open resources can generate exceptions that must be handled by the method that calls Finalize().
EventLog Class | EventLog Members | System.Diagnostics Namespace | Dispose