Frees resources used by the TcpClient class.
Protected Overrides Sub Finalize
Me.Finalize()
protected override void Finalize()
protected: virtual void Finalize() override
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 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC