Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Finalize Method
Collapse the table of content
Expand the table of content

Component.Finalize Method

Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection.

[C#] In C#, finalizers are expressed using destructor syntax.

[C++] In C++, finalizers are expressed using destructor syntax.

[Visual Basic]
Overrides Protected Sub Finalize()
[C#]
~Component();
[C++]
~Component();
[JScript]
protected override function Finalize();

Remarks

Calls Dispose with the disposing parameter set to false to free unmanaged resources.

This method overrides Object.Finalize. Application code should not call this method; an object's Finalize method is automatically invoked during garbage collection, unless finalization by the garbage collector has been disabled by a call to the GC.SuppressFinalize method.

For more information about Object.Finalize and Dispose, see Finalize Methods and Destructors, Cleaning Up Unmanaged Resources, and Overriding the Finalize Method.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

Component Class | Component Members | System.ComponentModel Namespace

Show:
© 2015 Microsoft