Release all the things

This commit is contained in:
Albert Vaca Cintora 2023-05-25 13:02:16 +02:00
parent 28ebc0c12b
commit 146b2d62e0

View file

@ -227,6 +227,11 @@ SystemvolumePlugin::SystemvolumePlugin(QObject *parent, const QVariantList &args
SystemvolumePlugin::~SystemvolumePlugin()
{
if (valid) {
for (auto &entry : sinkList) {
entry.first->UnregisterControlChangeNotify(entry.second);
entry.second->Release();
entry.first->Release();
}
deviceEnumerator->UnregisterEndpointNotificationCallback(deviceCallback);
deviceEnumerator->Release();
deviceEnumerator = nullptr;