Fix memory leak
Jeffrey Pfau jeffrey@endrift.com
Sun, 20 Jul 2014 22:07:08 -0700
1 files changed,
9 insertions(+),
1 deletions(-)
jump to
M
src/platform/qt/AudioDevice.cpp
→
src/platform/qt/AudioDevice.cpp
@@ -49,7 +49,15 @@ }
void AudioThread::shutdown() { disconnect(); - m_audioOutput->stop(); + if (m_audioOutput) { + m_audioOutput->stop(); + delete m_audioOutput; + m_audioOutput = nullptr; + } + if (m_device) { + delete m_device; + m_device = nullptr; + } quit(); }