From 9c80de8aa6d92a13e837ac9ba96b11566d318358 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sun, 10 Oct 2021 06:51:11 -0400
Subject: [PATCH] Code cleanup

---
 indra/llcommon/llcommon.cpp |  2 --
 indra/llcommon/llrefcount.h |  7 -------
 indra/llcommon/llthread.cpp | 22 ----------------------
 3 files changed, 31 deletions(-)

diff --git a/indra/llcommon/llcommon.cpp b/indra/llcommon/llcommon.cpp
index 96be913d17a..6972cef7cd1 100644
--- a/indra/llcommon/llcommon.cpp
+++ b/indra/llcommon/llcommon.cpp
@@ -47,7 +47,6 @@ void LLCommon::initClass()
 		sAprInitialized = TRUE;
 	}
 	LLTimer::initClass();
-	LLThreadSafeRefCount::initThreadSafeRefCount();
 	assert_main_thread();		// Make sure we record the main thread
 	if (!sMasterThreadRecorder)
 	{
@@ -62,7 +61,6 @@ void LLCommon::cleanupClass()
 	delete sMasterThreadRecorder;
 	sMasterThreadRecorder = NULL;
 	LLTrace::set_master_thread_recorder(NULL);
-	LLThreadSafeRefCount::cleanupThreadSafeRefCount();
 	SUBSYSTEM_CLEANUP_DBG(LLTimer);
 	if (sAprInitialized)
 	{
diff --git a/indra/llcommon/llrefcount.h b/indra/llcommon/llrefcount.h
index 7e4af6ea66a..0e45a80e419 100644
--- a/indra/llcommon/llrefcount.h
+++ b/indra/llcommon/llrefcount.h
@@ -81,13 +81,6 @@ class LL_COMMON_API LLRefCount
 
 class LL_COMMON_API LLThreadSafeRefCount
 {
-public:
-	static void initThreadSafeRefCount(); // creates sMutex
-	static void cleanupThreadSafeRefCount(); // destroys sMutex
-
-private:
-	static LLMutex* sMutex;
-
 protected:
 	virtual ~LLThreadSafeRefCount(); // use unref()
 
diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp
index f8e997c1cad..d8ec29b5b94 100644
--- a/indra/llcommon/llthread.cpp
+++ b/indra/llcommon/llthread.cpp
@@ -409,28 +409,6 @@ void LLThread::unlockData()
 
 //============================================================================
 
-//----------------------------------------------------------------------------
-
-//static
-LLMutex* LLThreadSafeRefCount::sMutex = 0;
-
-//static
-void LLThreadSafeRefCount::initThreadSafeRefCount()
-{
-    if (!sMutex)
-    {
-        sMutex = new LLMutex();
-    }
-}
-
-//static
-void LLThreadSafeRefCount::cleanupThreadSafeRefCount()
-{
-    delete sMutex;
-    sMutex = NULL;
-}
-    
-
 //----------------------------------------------------------------------------
 
 LLThreadSafeRefCount::LLThreadSafeRefCount() :
-- 
GitLab