Index: src/cpu-profiler.cc |
diff --git a/src/cpu-profiler.cc b/src/cpu-profiler.cc |
index b1af621cccc1a3425e87534faafa8b14cea77c7f..0c5beeedfe1a1a3a1613528b056d259cf25f6dce 100644 |
--- a/src/cpu-profiler.cc |
+++ b/src/cpu-profiler.cc |
@@ -176,6 +176,10 @@ void CpuProfiler::DeleteAllProfiles() { |
void CpuProfiler::DeleteProfile(CpuProfile* profile) { |
profiles_->RemoveProfile(profile); |
delete profile; |
+ if (profiles_->profiles()->is_empty() && !is_profiling_) { |
+ // If this was the last profile, clean up all accessory data as well. |
Jakob Kummerow
2013/12/11 14:22:58
nit: indentation
yurys
2013/12/11 14:34:34
Done.
|
+ ResetProfiles(); |
+ } |
} |