History

Merge pull request #9683 from jherico/cache_flush

Clear caches on domain switch

Andrew Meadows committed 9 years ago

Commit 6ea64772 parents 781e0be 127a0143 files · +12 −5Browse files

Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all

Unified · Split

interface/src/Application.cpp+7−0
@@ -5192,6 +5192,7 @@ void Application::updateWindowTitle() const { · 5191 unmodified lines
51925192 #endif
51935193 _window->setWindowTitle(title);
51945194 }
5195+
51955196 void Application::clearDomainOctreeDetails() {
51965197
51975198 // if we're about to quit, we really don't need to do any of these things...
@@ -5221,6 +5222,12 @@ void Application::clearDomainOctreeDetails() { · 23 unmodified lines
52215222 skyStage->setBackgroundMode(model::SunSkyStage::SKY_DEFAULT);
52225223
52235224 _recentlyClearedDomain = true;
5225+
5226+ DependencyManager::get<AvatarManager>()->clearOtherAvatars();
5227+ DependencyManager::get<AnimationCache>()->clearUnusedResources();
5228+ DependencyManager::get<ModelCache>()->clearUnusedResources();
5229+ DependencyManager::get<SoundCache>()->clearUnusedResources();
5230+ DependencyManager::get<TextureCache>()->clearUnusedResources();
52245231 }
52255232
52265233 void Application::domainChanged(const QString& domainHostname) {