mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01: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
|
||||
DependencyManager::destroy<OffscreenUi>();
|
||||
|
||||
delete _snapshotSoundInjector;
|
||||
_snapshotSoundInjector = nullptr;
|
||||
|
||||
// stop audio after QML, as there are unexplained audio crashes originating in qtwebengine
|
||||
|
||||
// stop the AudioClient, synchronously
|
||||
QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(),
|
||||
"stop", Qt::BlockingQueuedConnection);
|
||||
|
||||
|
||||
// destroy Audio so it and its threads have a chance to go down safely
|
||||
DependencyManager::destroy<AudioClient>();
|
||||
DependencyManager::destroy<AudioInjectorManager>();
|
||||
|
||||
// delete _snapshotSound;
|
||||
// _snapshotSound = nullptr;
|
||||
qCDebug(interfaceapp) << "Application::cleanupBeforeQuit() complete";
|
||||
}
|
||||
|
||||
|
|
|
@ -685,7 +685,7 @@ private:
|
|||
QTimer _addAssetToWorldErrorTimer;
|
||||
|
||||
FileScriptingInterface* _fileDownload;
|
||||
AudioInjector* _snapshotSoundInjector{ nullptr };
|
||||
AudioInjector* _snapshotSoundInjector { nullptr };
|
||||
SharedSoundPointer _snapshotSound;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue