mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 22:10:32 +02:00
Code nitpick. Pointer cleanup on exit
This commit is contained in:
parent
06406ef7de
commit
b2533b6106
2 changed files with 5 additions and 3 deletions
|
@ -1780,18 +1780,20 @@ void Application::cleanupBeforeQuit() {
|
||||||
// stop QML
|
// stop QML
|
||||||
DependencyManager::destroy<OffscreenUi>();
|
DependencyManager::destroy<OffscreenUi>();
|
||||||
|
|
||||||
|
delete _snapshotSoundInjector;
|
||||||
|
_snapshotSoundInjector = nullptr;
|
||||||
|
|
||||||
// stop audio after QML, as there are unexplained audio crashes originating in qtwebengine
|
// stop audio after QML, as there are unexplained audio crashes originating in qtwebengine
|
||||||
|
|
||||||
// stop the AudioClient, synchronously
|
// stop the AudioClient, synchronously
|
||||||
QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(),
|
QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(),
|
||||||
"stop", Qt::BlockingQueuedConnection);
|
"stop", Qt::BlockingQueuedConnection);
|
||||||
|
|
||||||
|
|
||||||
// destroy Audio so it and its threads have a chance to go down safely
|
// destroy Audio so it and its threads have a chance to go down safely
|
||||||
DependencyManager::destroy<AudioClient>();
|
DependencyManager::destroy<AudioClient>();
|
||||||
DependencyManager::destroy<AudioInjectorManager>();
|
DependencyManager::destroy<AudioInjectorManager>();
|
||||||
|
|
||||||
// delete _snapshotSound;
|
|
||||||
// _snapshotSound = nullptr;
|
|
||||||
qCDebug(interfaceapp) << "Application::cleanupBeforeQuit() complete";
|
qCDebug(interfaceapp) << "Application::cleanupBeforeQuit() complete";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue