summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorStinson Linden <stinson@lindenlab.com>2014-06-05 23:15:43 +0100
committerStinson Linden <stinson@lindenlab.com>2014-06-05 23:15:43 +0100
commit47a5e1c751bb8dfccef65ee841749d8209106c99 (patch)
treed0fbbda59d0078c2b686fa33d54e625e93c2a529 /indra/newview
parent739f4954b165bd993f8dfaf0636b7a29c228e091 (diff)
MAINT-4009: Ensuring that the local bitmaps are cleaned up on app exit.
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llappviewer.cpp5
-rwxr-xr-xindra/newview/lllocalbitmaps.cpp6
-rwxr-xr-xindra/newview/lllocalbitmaps.h1
3 files changed, 11 insertions, 1 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 1c38adb879..42f56fff32 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -100,6 +100,7 @@
#include "llspellcheck.h"
#include "llscenemonitor.h"
#include "llavatarrenderinfoaccountant.h"
+#include "lllocalbitmaps.h"
// Linden library includes
#include "llavatarnamecache.h"
@@ -1758,7 +1759,9 @@ bool LLAppViewer::cleanup()
#if 0 // this seems to get us stuck in an infinite loop...
gTransferManager.cleanup();
#endif
-
+
+ LLLocalBitmapMgr::cleanupClass();
+
// Note: this is where gWorldMap used to be deleted.
// Note: this is where gHUDManager used to be deleted.
diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp
index 1948475530..e78e0233d7 100755
--- a/indra/newview/lllocalbitmaps.cpp
+++ b/indra/newview/lllocalbitmaps.cpp
@@ -824,6 +824,12 @@ LLLocalBitmapMgr::~LLLocalBitmapMgr()
{
}
+void LLLocalBitmapMgr::cleanupClass()
+{
+ std::for_each(sBitmapList.begin(), sBitmapList.end(), DeletePointer());
+ sBitmapList.clear();
+}
+
bool LLLocalBitmapMgr::addUnit()
{
bool add_successful = false;
diff --git a/indra/newview/lllocalbitmaps.h b/indra/newview/lllocalbitmaps.h
index 47c077dcab..a15ea10801 100755
--- a/indra/newview/lllocalbitmaps.h
+++ b/indra/newview/lllocalbitmaps.h
@@ -117,6 +117,7 @@ class LLLocalBitmapMgr
~LLLocalBitmapMgr();
public:
+ static void cleanupClass();
static bool addUnit();
static void delUnit(LLUUID tracking_id);