From 146b2d62e0df2784a0ae22fb74224bb0ef253ed2 Mon Sep 17 00:00:00 2001 From: Albert Vaca Cintora Date: Thu, 25 May 2023 13:02:16 +0200 Subject: [PATCH] Release all the things --- plugins/systemvolume/systemvolumeplugin-win.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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;