summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llcommon/llwatchdog.h5
-rw-r--r--indra/newview/llappviewer.cpp5
-rw-r--r--indra/newview/llviewernetwork.h11
-rw-r--r--indra/newview/tests/llslurl_test.cpp2
-rw-r--r--indra/newview/tests/llviewernetwork_test.cpp2
5 files changed, 22 insertions, 3 deletions
diff --git a/indra/llcommon/llwatchdog.h b/indra/llcommon/llwatchdog.h
index 3e82fd36b9..ea567197c5 100644
--- a/indra/llcommon/llwatchdog.h
+++ b/indra/llcommon/llwatchdog.h
@@ -91,6 +91,11 @@ public:
LLWatchdog();
~LLWatchdog();
+ LLWatchdog(const LLWatchdog&) = delete;
+ LLWatchdog(LLWatchdog&&) = delete;
+ LLWatchdog& operator=(const LLWatchdog&) = delete;
+ LLWatchdog& operator=(LLWatchdog&&) = delete;
+
// Add an entry to the watchdog.
void add(LLWatchdogEntry* e);
void remove(LLWatchdogEntry* e);
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 2d8e94fdda..d3df15a642 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2175,6 +2175,7 @@ bool LLAppViewer::cleanup()
LLWorld::deleteSingleton();
LLVoiceClient::deleteSingleton();
LLUI::deleteSingleton();
+ LLGridManager::deleteSingleton();
LLWatchdog::deleteSingleton();
// It's not at first obvious where, in this long sequence, a generic cleanup
@@ -3009,6 +3010,8 @@ bool LLAppViewer::initConfiguration()
}
}
+ LLGridManager::createInstance();
+
LLSLURL start_slurl;
if (!starting_location.empty())
{
@@ -3057,6 +3060,7 @@ bool LLAppViewer::initConfiguration()
// Do not save settings.
// Might be smarter to have an exit code for a more reliable
// "early exit, needs cleanup" case.
+ LLGridManager::deleteSingleton();
LLSingletonBase::deleteAll();
cleanupConsole();
delete mSettingsLocationList;
@@ -3117,6 +3121,7 @@ bool LLAppViewer::initConfiguration()
// Since returning 'false' is basically an error without cleanup,
// do cleanup here. No need to worry about marker files here.
+ LLGridManager::deleteSingleton();
LLSingletonBase::deleteAll();
cleanupConsole();
return false;
diff --git a/indra/newview/llviewernetwork.h b/indra/newview/llviewernetwork.h
index 0937425a18..18c23cf7ff 100644
--- a/indra/newview/llviewernetwork.h
+++ b/indra/newview/llviewernetwork.h
@@ -57,13 +57,18 @@ protected:
* This class maintains the currently selected grid, and provides short
* form accessors for each of the properties of the selected grid.
**/
-class LLGridManager : public LLSingleton<LLGridManager>
+class LLGridManager : public LLSimpleton<LLGridManager>
{
+public:
/// Instantiate the grid manager, load default grids, selects the default grid
- LLSINGLETON(LLGridManager);
+ LLGridManager();
~LLGridManager();
- public:
+ LLGridManager(const LLGridManager&) = delete;
+ LLGridManager(LLGridManager&&) = delete;
+ LLGridManager& operator=(const LLGridManager&) = delete;
+ LLGridManager& operator=(LLGridManager&&) = delete;
+
/* ================================================================
* @name Initialization and Configuration
* @{
diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp
index 3ff38ea372..bf23538201 100644
--- a/indra/newview/tests/llslurl_test.cpp
+++ b/indra/newview/tests/llslurl_test.cpp
@@ -147,10 +147,12 @@ namespace tut
{
slurlTest()
{
+ LLGridManager::createInstance();
LLGridManager::getInstance()->initialize(std::string(""));
}
~slurlTest()
{
+ LLGridManager::deleteSingleton();
}
};
diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp
index 1cbb8b50eb..6190d7052b 100644
--- a/indra/newview/tests/llviewernetwork_test.cpp
+++ b/indra/newview/tests/llviewernetwork_test.cpp
@@ -175,6 +175,7 @@ namespace tut
{
viewerNetworkTest()
{
+ LLGridManager::createInstance();
LLFile::remove(TEST_FILENAME);
gCmdLineLoginURI.clear();
gCmdLineGridChoice.clear();
@@ -185,6 +186,7 @@ namespace tut
~viewerNetworkTest()
{
LLFile::remove(TEST_FILENAME);
+ LLGridManager::deleteSingleton();
}
};