Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5581)

Unified Diff: chrome/browser/metrics/metrics_service.cc

Issue 19407: Make purify happy by fixing memory leak that shows up during shutdown. (Closed)
Patch Set: Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/metrics_service.cc
diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc
index f89b2a7f7258cce051f0b7e6025db9ea755e33f0..5d6159f093543f933d1f4e992ac60dd2f01b468d 100644
--- a/chrome/browser/metrics/metrics_service.cc
+++ b/chrome/browser/metrics/metrics_service.cc
@@ -349,6 +349,14 @@ MetricsService::MetricsService()
MetricsService::~MetricsService() {
SetRecording(false);
+ if (pending_log_) {
darin (slow to review) 2009/01/28 09:18:27 nit: there's no need to null-check a pointer befor
+ delete pending_log_;
+ pending_log_ = NULL;
+ }
+ if (current_log_) {
+ delete current_log_;
+ current_log_ = NULL;
+ }
}
void MetricsService::SetUserPermitsUpload(bool enabled) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698