From 4e080dcbfc8b519b041f125c53ad5f7313ac5393 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Wed, 4 Jul 2018 23:17:04 +0300 Subject: QSampleCache: Fix memory leak and a warning on termination: QCoreApplication::postEvent: Unexpected null receiver During static deinit it is not possible to use deleteLater, as there is no event loop running at this stage. The crash that was described in QTBUG-30630 doesn't reproduce with Qt 5.10, so I guess it should be safe to just delete. Change-Id: I0c404d71e9f102018e314c890ff679f8c0952b07 Reviewed-by: VaL Doroshchuk --- src/multimedia/audio/qsamplecache_p.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/multimedia/audio/qsamplecache_p.cpp b/src/multimedia/audio/qsamplecache_p.cpp index 93010c182..43f948cef 100644 --- a/src/multimedia/audio/qsamplecache_p.cpp +++ b/src/multimedia/audio/qsamplecache_p.cpp @@ -132,8 +132,7 @@ QSampleCache::~QSampleCache() for (QSample* sample : copyStaleSamples) delete sample; - if (m_networkAccessManager) - m_networkAccessManager->deleteLater(); + delete m_networkAccessManager; } void QSampleCache::loadingRelease() -- cgit v1.2.3