mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 17:00:13 +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";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -685,7 +685,7 @@ private:
|
||||||
QTimer _addAssetToWorldErrorTimer;
|
QTimer _addAssetToWorldErrorTimer;
|
||||||
|
|
||||||
FileScriptingInterface* _fileDownload;
|
FileScriptingInterface* _fileDownload;
|
||||||
AudioInjector* _snapshotSoundInjector{ nullptr };
|
AudioInjector* _snapshotSoundInjector { nullptr };
|
||||||
SharedSoundPointer _snapshotSound;
|
SharedSoundPointer _snapshotSound;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue