commit 552c4f8aa717e1b9327626fd124030c7737ee49f
parent b8d7747b100922ca1302fdd2f9ebb1691f82935e
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date: Tue, 18 Jan 2022 20:24:33 +0100
fix GUI not being destroyed, causing to leak memory
Diffstat:
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/source/jucePlugin/PluginEditor.cpp b/source/jucePlugin/PluginEditor.cpp
@@ -38,6 +38,7 @@ AudioPluginAudioProcessorEditor::AudioPluginAudioProcessorEditor(AudioPluginAudi
AudioPluginAudioProcessorEditor::~AudioPluginAudioProcessorEditor()
{
+ delete m_virusEditor;
}
//==============================================================================
diff --git a/source/jucePlugin/VirusController.cpp b/source/jucePlugin/VirusController.cpp
@@ -36,6 +36,12 @@ namespace Virus
startTimer(5);
}
+ Controller::~Controller()
+ {
+ stopTimer();
+ delete m_config;
+ }
+
void Controller::registerParams()
{
// 16 parts * 3 pages * 128 params
diff --git a/source/jucePlugin/VirusController.h b/source/jucePlugin/VirusController.h
@@ -396,7 +396,7 @@ namespace Virus
static constexpr auto kNameLength = 10;
Controller(AudioPluginAudioProcessor &, unsigned char deviceId = 0x00);
- ~Controller() { stopTimer(); }
+ ~Controller();
// this is called by the plug-in on audio thread!
void dispatchVirusOut(const std::vector<synthLib::SMidiEvent> &);