MAINT-4009: Ensuring that the local bitmaps are cleaned up on app exit.

master
Stinson Linden 2014-06-05 23:15:43 +01:00
parent 739f4954b1
commit 47a5e1c751
3 changed files with 11 additions and 1 deletions

View File

@ -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.

View File

@ -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;

View File

@ -117,6 +117,7 @@ class LLLocalBitmapMgr
~LLLocalBitmapMgr();
public:
static void cleanupClass();
static bool addUnit();
static void delUnit(LLUUID tracking_id);