Fix logging memory leak.
Use a UniquePtr to ensure the LogMessage::data_ member is deleted.
Change-Id: Ifbf5e38307c72908579a7adbe1660f99da0e558e
diff --git a/runtime/base/logging.h b/runtime/base/logging.h
index d641ae4..eafa050 100644
--- a/runtime/base/logging.h
+++ b/runtime/base/logging.h
@@ -24,6 +24,7 @@
#include <signal.h>
#include "base/macros.h"
#include "log_severity.h"
+#include "UniquePtr.h"
#define CHECK(x) \
if (UNLIKELY(!(x))) \
@@ -194,7 +195,7 @@
private:
static void LogLine(const LogMessageData& data, const char*);
- LogMessageData* const data_;
+ const UniquePtr<LogMessageData> data_;
friend void HandleUnexpectedSignal(int signal_number, siginfo_t* info, void* raw_context);
friend class Mutex;