summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVaL Doroshchuk <valentyn.doroshchuk@qt.io>2017-12-01 14:35:00 +0100
committerVaL Doroshchuk <valentyn.doroshchuk@qt.io>2017-12-14 09:12:02 +0000
commit7097e38a48db6ea25314121e70c48e8561399d98 (patch)
tree7d01bb1e0f8905c58aebc6441b456d399db96a5a /src
parent10998733af8a3d54b795ee57a8df9a1b3e776aae (diff)
Fix memory leak in QSoundEffect
If qthread is being exited all objects that belong to it also should be cleaned up. Task-number: QTBUG-64407 Change-Id: Ida09fcfac7e1ee2741c6e1b76a672a7a5775addc Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/multimedia/audio/qsamplecache_p.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/multimedia/audio/qsamplecache_p.cpp b/src/multimedia/audio/qsamplecache_p.cpp
index 48734683..c76f5189 100644
--- a/src/multimedia/audio/qsamplecache_p.cpp
+++ b/src/multimedia/audio/qsamplecache_p.cpp
@@ -140,8 +140,11 @@ void QSampleCache::loadingRelease()
QMutexLocker locker(&m_loadingMutex);
m_loadingRefCount--;
if (m_loadingRefCount == 0) {
- if (m_loadingThread.isRunning())
+ if (m_loadingThread.isRunning()) {
+ m_networkAccessManager->deleteLater();
+ m_networkAccessManager = nullptr;
m_loadingThread.exit();
+ }
}
}