Clear caches on domain switch
Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all
Unified · Split
| @@ -5192,6 +5192,7 @@ void Application::updateWindowTitle() const { · 5191 unmodified lines | ||
| 5192 | 5192 | #endif |
| 5193 | 5193 | _window->setWindowTitle(title); |
| 5194 | 5194 | } |
| 5195 | + | |
| 5195 | 5196 | void Application::clearDomainOctreeDetails() { |
| 5196 | 5197 | |
| 5197 | 5198 | // 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 | ||
| 5221 | 5222 | skyStage->setBackgroundMode(model::SunSkyStage::SKY_DEFAULT); |
| 5222 | 5223 | |
| 5223 | 5224 | _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(); | |
| 5224 | 5231 | } |
| 5225 | 5232 | |
| 5226 | 5233 | void Application::domainChanged(const QString& domainHostname) { |