Index: base/metrics/sample_map.cc |
diff --git a/base/metrics/sample_map.cc b/base/metrics/sample_map.cc |
index f0e4e5edb15b089394dfa95fe57ce106ca9d5266..08fe032057702df2f4f500f836891a843a8a007a 100644 |
--- a/base/metrics/sample_map.cc |
+++ b/base/metrics/sample_map.cc |
@@ -79,9 +79,11 @@ void SampleMapIterator::SkipEmptyBuckets() { |
SampleMap::SampleMap() : SampleMap(0) {} |
-SampleMap::SampleMap(uint64_t id) : HistogramSamples(id) {} |
+SampleMap::SampleMap(uint64_t id) : HistogramSamples(id, new LocalMetadata()) {} |
-SampleMap::~SampleMap() {} |
+SampleMap::~SampleMap() { |
+ delete static_cast<LocalMetadata*>(meta()); |
+} |
void SampleMap::Accumulate(Sample value, Count count) { |
sample_counts_[value] += count; |