Mono Class Library: System.Net.Sockets.Socket Overview | Members

System.Net.Sockets.Socket.Dispose Method

Closes the current instance, releases the unmanaged resources allocated by the current instance, and optionally releases the managed resources. [Edit]

protected virtual void Dispose (bool explicitDisposing)

Parameters

explicitDisposing
A bool. Specify true to release both managed and unmanaged resources; false to release only unmanaged resources. [Edit]

Remarks

Operation
This method closes the current System.Net.Sockets.Socket instance and releases all unmanaged resources allocated by the current instance. When disposing is true, this method also releases all resources held by any managed objects allocated by the current instance.

This method closes the current System.Net.Sockets.Socket instance but does not release any managed resources.

Note to Inheritors
The Socket.Dispose(bool) method can be called multiple times by other objects. When overriding this method, do not reference objects that have been previously disposed in an earlier call.

Usage
Use this method to release resources allocated by the current instance.

[Edit]

Requirements

Namespace: System.Net.Sockets
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0