Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources, and performs other cleanup operations before garbage collection is performed.
| C# | Visual Basic |
protected override void Finalize()
Protected Overrides Sub Finalize