public void Dispose() { if (_handle != IntPtr.Zero) { var h = _handle; _handle = IntPtr.Zero; CAPI.CloseVideo(h); _cb_progress = null; } }