diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f89ab586d53f3ecb5f67645d52bb309590080831..a63203f3cba5d2f2fdf6c68392dc5d1c749592be 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2161,6 +2161,7 @@ bool LLAppViewer::cleanup() LLEnvironment::deleteSingleton(); LLSelectMgr::deleteSingleton(); LLViewerEventRecorder::deleteSingleton(); + LLWorld::deleteSingleton(); // It's not at first obvious where, in this long sequence, a generic cleanup // call OUGHT to go. So let's say this: as we migrate cleanup from @@ -5421,7 +5422,7 @@ void LLAppViewer::disconnectViewer() // Now we just ask the LLWorld singleton to cleanly shut down. if(LLWorld::instanceExists()) { - LLWorld::getInstance()->destroyClass(); + LLWorld::getInstance()->resetClass(); } LLVOCache::deleteSingleton(); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 8912d1cff16099d7803f4c6586efc1c87799a7af..5df8cd9cb0b542989d440a92b851829031235f6f 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2841,7 +2841,7 @@ void reset_login() gAgentWearables.cleanup(); gAgentCamera.cleanup(); gAgent.cleanup(); - LLWorld::getInstance()->destroyClass(); + LLWorld::getInstance()->resetClass(); if ( gViewerWindow ) { // Hide menus and normal buttons diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 82629fd737023fdbfd44da244100b21c47fe653d..8abb49fba8b871b6c9e56976eff55b14aeceffeb 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -113,7 +113,7 @@ LLWorld::LLWorld() : } -void LLWorld::destroyClass() +void LLWorld::resetClass() { mHoleWaterObjects.clear(); gObjectList.destroy(); @@ -135,7 +135,6 @@ void LLWorld::destroyClass() LLDrawable::incrementVisible(); LLSceneMonitor::deleteSingleton(); - LLWorld::deleteSingleton(); } diff --git a/indra/newview/llworld.h b/indra/newview/llworld.h index 69f2df42032313e4471ad0cd99fe6a1f83fa2bcf..5c43cdf4e274f932a5bce44fd11c1de7ff90f932 100644 --- a/indra/newview/llworld.h +++ b/indra/newview/llworld.h @@ -64,7 +64,9 @@ class LLWorld : public LLSimpleton<LLWorld> public: LLWorld(); - void destroyClass(); + // Clear any objects, regions + // Prepares class to be reused or destroyed + void resetClass(); LLViewerRegion* addRegion(const U64 ®ion_handle, const LLHost &host); // safe to call if already present, does the "right thing" if