Dispose() public method

public Dispose ( ) : void
return void
Example #1
0
 /// <summary>
 /// Callback for when a connection had disconnected
 /// </summary>
 /// <param name="sender">The client object whom is disconnecting</param>
 private void GpspClient_OnDisconnect(GpspClient client)
 {
     // Release this stream's AsyncEventArgs to the object pool
     base.Release(client.Stream);
     if (Clients.TryRemove(client.ConnectionId, out client) && !client.Disposed)
     {
         client.Dispose();
     }
 }
 /// <summary>
 /// Callback for when a connection had disconnected
 /// </summary>
 /// <param name="sender">The client object whom is disconnecting</param>
 private void GpspClient_OnDisconnect(GpspClient client)
 {
     // Release this stream's AsyncEventArgs to the object pool
     base.Release(client.Stream);
     if (Clients.TryRemove(client.ConnectionId, out client) && !client.Disposed)
         client.Dispose();
 }