/** * Called when all the SharpBCI threads should shutdown. * You may or may not continue to receive events after calling this * You should unregister events before calling this to avoid memory leaks */ public void Close() { Logger.Log("SharpBCI closed"); cts.Cancel(); foreach (var stage in stages) { stage.Stop(); } if (file != null) { file.Close(); } }
public void Dispose() { outputStream.Close(); }