Export (0) Print
Expand All

TcpClient.Finalize Method

Frees resources used by the TcpClient class.

Namespace: System.Net.Sockets
Assembly: System (in system.dll)

~TcpClient()
protected void finalize ()
protected override function Finalize ()

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.

The TcpClient class finalizer closes the TCP connection and releases all managed resources associated with the TcpClient. These resources include the underlying Socket used for connecting with the remote host, and the NetworkStream used to send and receive data. The finalizer does not release any unmanaged resources.

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

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft