diff --git a/plugins/systemvolume/systemvolumeplugin-win.cpp b/plugins/systemvolume/systemvolumeplugin-win.cpp index 548017a2c..82513b3c8 100644 --- a/plugins/systemvolume/systemvolumeplugin-win.cpp +++ b/plugins/systemvolume/systemvolumeplugin-win.cpp @@ -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;