summaryrefslogtreecommitdiffstats
path: root/runtime/base
diff options
context:
space:
mode:
authorSebastien Hertz <shertz@google.com>2013-08-07 07:14:52 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-08-07 07:14:52 +0000
commite7711c5731bb78f2cbc1938b706da79d504e89f4 (patch)
tree06efbd2e5a3e2273720041821e92b2a3e401a3ce /runtime/base
parentbeb4148cf4660e05259f915910ae057beabaa829 (diff)
parent916041f1ea33f5cb9de869d28dcdfaa390095c32 (diff)
downloadart-e7711c5731bb78f2cbc1938b706da79d504e89f4.zip
art-e7711c5731bb78f2cbc1938b706da79d504e89f4.tar.gz
art-e7711c5731bb78f2cbc1938b706da79d504e89f4.tar.bz2
Merge "Fix logging memory leak." into dalvik-dev
Diffstat (limited to 'runtime/base')
-rw-r--r--runtime/base/logging.cc2
-rw-r--r--runtime/base/logging.h3
2 files changed, 2 insertions, 3 deletions
diff --git a/runtime/base/logging.cc b/runtime/base/logging.cc
index 83ecca8..7d54baf 100644
--- a/runtime/base/logging.cc
+++ b/runtime/base/logging.cc
@@ -156,8 +156,6 @@ LogMessage::~LogMessage() {
if (data_->severity == FATAL) {
Runtime::Abort();
}
-
- delete data_;
}
HexDump::HexDump(const void* address, size_t byte_count, bool show_actual_addresses)
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 @@ class LogMessage {
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;