all repos — mgba @ ad5cdb97a8334e218ffc7ccc8e94d84a417e36a7

mGBA Game Boy Advance Emulator

Fix memory leak
Jeffrey Pfau jeffrey@endrift.com
Sun, 20 Jul 2014 22:07:08 -0700
commit

ad5cdb97a8334e218ffc7ccc8e94d84a417e36a7

parent

a57f911eccd740d3dbc5581cd766cee65f43dee1

1 files changed, 9 insertions(+), 1 deletions(-)

jump to
M src/platform/qt/AudioDevice.cppsrc/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(); }