History

change ScriptCache and SoundCache to derive from Dependency

ZappoMan committed 11 years ago

Commit 1fc02251 parent 5c048db11 files · +56 −63Browse files

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

Unified · Split

interface/src/Application.cpp+6−1
@@ -211,6 +211,8 @@ bool setupEssentials(int& argc, char** argv) { · 210 unmodified lines
211211 auto addressManager = DependencyManager::set<AddressManager>();
212212 auto nodeList = DependencyManager::set<NodeList>(NodeType::Agent, listenPort);
213213 auto geometryCache = DependencyManager::set<GeometryCache>();
214+ auto scriptCache = DependencyManager::set<ScriptCache>();
215+ auto soundCache = DependencyManager::set<SoundCache>();
214216 auto glowEffect = DependencyManager::set<GlowEffect>();
215217 auto faceshift = DependencyManager::set<Faceshift>();
216218 auto audio = DependencyManager::set<AudioClient>();
@@ -563,11 +565,14 @@ Application::~Application() { · 346 unmodified lines
563565 _myAvatar = NULL;
564566
565567 DependencyManager::destroy<GLCanvas>();
568+
569+ qDebug() << "start destroying ResourceCaches Application::~Application() line:" << __LINE__;
566570 DependencyManager::destroy<AnimationCache>();
567571 DependencyManager::destroy<TextureCache>();
568572 DependencyManager::destroy<GeometryCache>();
569573 DependencyManager::destroy<ScriptCache>();
570574 DependencyManager::destroy<SoundCache>();
575+ qDebug() << "done destroying ResourceCaches Application::~Application() line:" << __LINE__;
571576 }
572577
573578 void Application::initializeGL() {
@@ -3466,7 +3471,7 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEngine* scri · 2892 unmodified lines
34663471 scriptEngine->registerGlobalObject("Settings", SettingsScriptingInterface::getInstance());
34673472 scriptEngine->registerGlobalObject("AudioDevice", AudioDeviceScriptingInterface::getInstance());
34683473 scriptEngine->registerGlobalObject("AnimationCache", DependencyManager::get<AnimationCache>().data());
3469− scriptEngine->registerGlobalObject("SoundCache", &SoundCache::getInstance());
3474+ scriptEngine->registerGlobalObject("SoundCache", DependencyManager::get<SoundCache>().data());
34703475 scriptEngine->registerGlobalObject("Account", AccountScriptingInterface::getInstance());
34713476 scriptEngine->registerGlobalObject("Metavoxels", &_metavoxels);
34723477

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t