waddlesplash / QMidi

Qt library for MIDI output & MIDI file I/O.
MIT License
84 stars 38 forks source link

Unnecessary disposing #37

Open Trebor-Huang opened 2 years ago

Trebor-Huang commented 2 years ago

https://github.com/waddlesplash/QMidi/blob/de0a2b1b3ccc494114353d3eee863bebd6811618/src/OS/QMidi_CoreMidi.cpp#L92-L100

Quoting documentation:

Don’t explicitly dispose of your client; the system automatically disposes all clients when an app terminates. However, if you call this method to dispose the last or only client owned by an app, the MIDI server may exit if there are no other clients remaining in the system. If this occurs, all subsequent calls by your app to MIDIClientCreate and MIDIClientCreateWithBlock fail.

Trebor-Huang commented 2 years ago

There is also a deprecated API in use. I'm a bit tight on time finishing schoolwork, but after a few days I may come back with a PR.