summaryrefslogtreecommitdiff
path: root/indra/newview/llwindebug.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llwindebug.cpp')
-rwxr-xr-xindra/newview/llwindebug.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/indra/newview/llwindebug.cpp b/indra/newview/llwindebug.cpp
index 551d0be8d7..eff70ca0b2 100755
--- a/indra/newview/llwindebug.cpp
+++ b/indra/newview/llwindebug.cpp
@@ -45,7 +45,7 @@ public:
~LLMemoryReserve();
void reserve();
void release();
-protected:
+private:
unsigned char *mReserve;
static const size_t MEMORY_RESERVATION_SIZE;
};
@@ -53,7 +53,7 @@ protected:
LLMemoryReserve::LLMemoryReserve() :
mReserve(NULL)
{
-};
+}
LLMemoryReserve::~LLMemoryReserve()
{
@@ -66,14 +66,19 @@ const size_t LLMemoryReserve::MEMORY_RESERVATION_SIZE = 5 * 1024 * 1024;
void LLMemoryReserve::reserve()
{
if(NULL == mReserve)
+ {
mReserve = new unsigned char[MEMORY_RESERVATION_SIZE];
-};
+ }
+}
void LLMemoryReserve::release()
{
- delete [] mReserve;
+ if (NULL != mReserve)
+ {
+ delete [] mReserve;
+ }
mReserve = NULL;
-};
+}
static LLMemoryReserve gEmergencyMemoryReserve;
@@ -130,6 +135,11 @@ void LLWinDebug::init()
}
}
+void LLWinDebug::cleanup ()
+{
+ gEmergencyMemoryReserve.release();
+}
+
void LLWinDebug::writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMATION *ExInfop, const std::string& filename)
{
// Temporary fix to switch out the code that writes the DMP file.