public void Dispose() { if (_rtmidi == null || !_rtmidi->ok) { return; } RtMidiDll.OutFree(_rtmidi); _rtmidi = null; System.GC.SuppressFinalize(this); }
public void Dispose() { if (_rtmidi == null || !_rtmidi->ok) { return; } if (_mode == Mode.In) { RtMidiDll.InFree(_rtmidi); } else // _mode == Mode.Out { RtMidiDll.OutFree(_rtmidi); } _rtmidi = null; System.GC.SuppressFinalize(this); }