From 98abefc68b80baf5e242c1752269590b6f1d8182 Mon Sep 17 00:00:00 2001 From: Daniele Forsi Date: Sat, 25 May 2024 23:54:17 +0200 Subject: [PATCH 1/4] Fix memleaks Frees memory allocated in SkyMapGUI::SkyMapGUI(PluginAPI*, FeatureUISet*, Feature*, QWidget*) sdrangel/plugins/feature/skymap/skymapgui.cpp:215 --- plugins/feature/skymap/skymapgui.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/feature/skymap/skymapgui.cpp b/plugins/feature/skymap/skymapgui.cpp index 0da9aa04dc..52b02bd23a 100644 --- a/plugins/feature/skymap/skymapgui.cpp +++ b/plugins/feature/skymap/skymapgui.cpp @@ -274,6 +274,7 @@ SkyMapGUI::~SkyMapGUI() m_webServer->close(); delete m_webServer; } + delete m_webInterface; delete ui; } From 8b5a5b7f70a86d8b5b25430930ebeac7d2646b3b Mon Sep 17 00:00:00 2001 From: Daniele Forsi Date: Sun, 26 May 2024 17:28:50 +0200 Subject: [PATCH 2/4] Fix memleaks Frees memory allocated in TVScreenAnalog::initializeGL() /home/daniele/Programmazione/ham/sdrangel/sdrgui/gui/tvscreenanalog.cpp:232 in TVScreenAnalog::initializeTextures(TVScreenAnalogBuffer*) /home/daniele/Programmazione/ham/sdrangel/sdrgui/gui/tvscreenanalog.cpp:285 in TVScreenAnalog::initializeTextures(TVScreenAnalogBuffer*) /home/daniele/Programmazione/ham/sdrangel/sdrgui/gui/tvscreenanalog.cpp:286 --- sdrgui/gui/tvscreenanalog.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/sdrgui/gui/tvscreenanalog.cpp b/sdrgui/gui/tvscreenanalog.cpp index 0b949501f5..1be2567fda 100644 --- a/sdrgui/gui/tvscreenanalog.cpp +++ b/sdrgui/gui/tvscreenanalog.cpp @@ -131,6 +131,7 @@ TVScreenAnalog::TVScreenAnalog(QWidget *parent) : TVScreenAnalog::~TVScreenAnalog() { + cleanup(); delete m_backBuffer; delete m_frontBuffer; } From 302f99382a059b45f684f404f83de1580979c74c Mon Sep 17 00:00:00 2001 From: Daniele Forsi Date: Sun, 26 May 2024 21:43:23 +0200 Subject: [PATCH 3/4] Fix memleaks Frees memory allocated in ChannelPowerSink::applyChannelSettings(int, int, bool) /home/daniele/Programmazione/ham/sdrangel/plugins/channelrx/channelpower/channelpowersink.cpp:120 --- plugins/channelrx/channelpower/channelpowersink.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/channelrx/channelpower/channelpowersink.cpp b/plugins/channelrx/channelpower/channelpowersink.cpp index 0c9f55f8db..fa78ce2f17 100644 --- a/plugins/channelrx/channelpower/channelpowersink.cpp +++ b/plugins/channelrx/channelpower/channelpowersink.cpp @@ -35,6 +35,7 @@ ChannelPowerSink::ChannelPowerSink(ChannelPower *channelPower) : ChannelPowerSink::~ChannelPowerSink() { + delete m_lowpassFFT; } void ChannelPowerSink::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end) From cf0e1291653c36886d6b107305de5986f417681b Mon Sep 17 00:00:00 2001 From: Daniele Forsi Date: Sun, 26 May 2024 22:02:18 +0200 Subject: [PATCH 4/4] Fix memleaks of QNetworkAccessManager() Frees memory allocated in AudioOutputPlugin::createSampleSinkPluginInstance(QString const&, DeviceAPI*) /home//sdrangel/plugins/samplesink/audiooutput/audiooutputplugin.cpp:136 in ChirpChatDemod::ChirpChatDemod(DeviceAPI*) /home/sdrangel/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp:84 in FileOutput::FileOutput(DeviceAPI*) /home/sdrangel/plugins/samplesink/fileoutput/fileoutput.cpp:54 in RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) /home/sdrangel/plugins/channelrx/radioastronomy/radioastronomygui.cpp:2061 in SatelliteSelectionDialog::SatelliteSelectionDialog(SatelliteTrackerSettings*, QHash const&, QWidget*) /home/sdrangel/plugins/feature/satellitetracker/satelliteselectiondialog.cpp:42:24 in SatelliteTracker::SatelliteTracker(WebAPIAdapterInterface*) /home/sdrangel/plugins/feature/satellitetracker/satellitetracker.cpp:61:24 --- plugins/channelrx/demodchirpchat/chirpchatdemod.cpp | 1 + plugins/channelrx/radioastronomy/radioastronomygui.cpp | 1 + plugins/feature/satellitetracker/satelliteselectiondialog.cpp | 1 + plugins/feature/satellitetracker/satellitetracker.cpp | 1 + plugins/samplesink/audiooutput/audiooutput.cpp | 1 + plugins/samplesink/fileoutput/fileoutput.cpp | 1 + 6 files changed, 6 insertions(+) diff --git a/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp b/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp index 6f6523bcf2..8ddedb3e30 100644 --- a/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp +++ b/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp @@ -95,6 +95,7 @@ ChirpChatDemod::ChirpChatDemod(DeviceAPI* deviceAPI) : ChirpChatDemod::~ChirpChatDemod() { + delete m_networkManager; m_deviceAPI->removeChannelSinkAPI(this); m_deviceAPI->removeChannelSink(this); stop(); diff --git a/plugins/channelrx/radioastronomy/radioastronomygui.cpp b/plugins/channelrx/radioastronomy/radioastronomygui.cpp index 44fd8256e1..370da38cc8 100644 --- a/plugins/channelrx/radioastronomy/radioastronomygui.cpp +++ b/plugins/channelrx/radioastronomy/radioastronomygui.cpp @@ -2297,6 +2297,7 @@ void RadioAstronomyGUI::customContextMenuRequested(QPoint pos) RadioAstronomyGUI::~RadioAstronomyGUI() { + delete m_networkManager; delete ui; delete m_calHot; delete m_calCold; diff --git a/plugins/feature/satellitetracker/satelliteselectiondialog.cpp b/plugins/feature/satellitetracker/satelliteselectiondialog.cpp index 7b6de3e913..0bb2fa81ee 100644 --- a/plugins/feature/satellitetracker/satelliteselectiondialog.cpp +++ b/plugins/feature/satellitetracker/satelliteselectiondialog.cpp @@ -71,6 +71,7 @@ SatelliteSelectionDialog::SatelliteSelectionDialog(SatelliteTrackerSettings *set SatelliteSelectionDialog::~SatelliteSelectionDialog() { + delete m_networkManager; delete ui; } diff --git a/plugins/feature/satellitetracker/satellitetracker.cpp b/plugins/feature/satellitetracker/satellitetracker.cpp index ce8540dd14..32fbecc2da 100644 --- a/plugins/feature/satellitetracker/satellitetracker.cpp +++ b/plugins/feature/satellitetracker/satellitetracker.cpp @@ -73,6 +73,7 @@ SatelliteTracker::SatelliteTracker(WebAPIAdapterInterface *webAPIAdapterInterfac SatelliteTracker::~SatelliteTracker() { + delete m_networkManager; stop(); qDeleteAll(m_satState); } diff --git a/plugins/samplesink/audiooutput/audiooutput.cpp b/plugins/samplesink/audiooutput/audiooutput.cpp index 32b20ff4ef..96ee3b83e8 100644 --- a/plugins/samplesink/audiooutput/audiooutput.cpp +++ b/plugins/samplesink/audiooutput/audiooutput.cpp @@ -57,6 +57,7 @@ AudioOutput::AudioOutput(DeviceAPI *deviceAPI) : AudioOutput::~AudioOutput() { + delete m_networkManager; stop(); } diff --git a/plugins/samplesink/fileoutput/fileoutput.cpp b/plugins/samplesink/fileoutput/fileoutput.cpp index 872a1c754c..f8a479802c 100644 --- a/plugins/samplesink/fileoutput/fileoutput.cpp +++ b/plugins/samplesink/fileoutput/fileoutput.cpp @@ -56,6 +56,7 @@ FileOutput::FileOutput(DeviceAPI *deviceAPI) : FileOutput::~FileOutput() { + delete m_networkManager; stop(); }