/// <summary>Clean up any resources being used.</summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing) { if (components != null) { components.Dispose(); } // Dispose of the statsConnection. if (statsConnection != null) { statsConnection.Dispose(); } // Dispose the sessionHeartbeatTimer and webClient. if (sessionHeartbeatTimer != null) { sessionHeartbeatTimer.Dispose(); } if (webClient != null) { webClient.Dispose(); } } base.Dispose(disposing); }
/// <summary>Clean up any resources being used.</summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected void Dispose(bool disposing) { if (disposing) { // Dispose of the statsConnection. if (statsConnection != null) { statsConnection.Dispose(); } // Dispose the sessionHeartbeatTimer. if (sessionHeartbeatTimer != null) { sessionHeartbeatTimer.Dispose(); } } }