public void DisposeObjects() { if (Xfer != null) { Xfer.Dispose(); Xfer = null; } if (Buffers != null) { Buffers.Dispose(); Buffers = null; } if (Acquisition != null) { Acquisition.Dispose(); Acquisition = null; } }
public Action Disconnect() { return(new Action(() => { if (Xfer != null) { Xfer.Destroy(); Xfer.Dispose(); } if (AcqDevice != null) { AcqDevice.Destroy(); AcqDevice.Dispose(); } if (Acquisition != null) { Acquisition.Destroy(); Acquisition.Dispose(); } if (Buffers != null) { Buffers.Destroy(); Buffers.Dispose(); } if (View != null) { View.Destroy(); View.Dispose(); } if (ServerLocation != null) { ServerLocation.Dispose(); } })); }
public void Disconnect( ) { try { if (Xfer != null) { Xfer.Destroy(); Xfer.Dispose(); } if (AcqDevice != null) { AcqDevice.Destroy(); AcqDevice.Dispose(); } if (Acquisition != null) { Acquisition.Destroy(); Acquisition.Dispose(); } if (Buffers != null) { Buffers.Destroy(); Buffers.Dispose(); } if (ServerLocation != null) { ServerLocation.Dispose(); } } catch (Exception) { } }