Share via


Finalize Method

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

Ensures that resources are freed and other cleanup operations are performed when the garbage collector reclaims the FileStream.

Namespace:  System.IO
Assembly:  System.IO (in System.IO.dll)

Syntax

'Declaration
Protected Overrides Sub Finalize
protected override void Finalize()
protected:
virtual void Finalize() override
abstract Finalize : unit -> unit 
override Finalize : unit -> unit 
protected override function Finalize()

Remarks

The garbage collector calls Finalize when the current object is ready to be finalized. Finalize closes the FileStream.

.NET Framework Security

See Also

Reference

FileStream Class

System.IO Namespace