public void Dispose() { var thread = _threadRecord; _threadRecord = null; if (thread == null) { return; } _eventCancel.Set(); thread.Join(); _eventFrame.Dispose(); _eventCancel.Dispose(); _writer.Dispose(); }
public void Dispose() { var thread = _threadRecord; _threadRecord = null; if (thread == null) { return; } _eventCancel.Set(); thread.Join(); _bitmap.Dispose(); if (_bitmapRaw != null) { _bitmapRaw.Dispose(); } _eventFrame.Dispose(); _eventCancel.Dispose(); _writerMP4.Close(); _writerWAV.Dispose(); }