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

Unified Diff: runtime/vm/timeline.cc

Issue 2621163008: VM: Free [TimelineEventBlock]s before shutting down (Closed)
Patch Set: Created 3 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 | « runtime/vm/timeline.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/timeline.cc
diff --git a/runtime/vm/timeline.cc b/runtime/vm/timeline.cc
index f0b0ee14c81e9b9affb8314d93d3dc3acdfff269..4c23d78c8a14d44cb15e27bd5fde5c89a0929022 100644
--- a/runtime/vm/timeline.cc
+++ b/runtime/vm/timeline.cc
@@ -1505,6 +1505,16 @@ void TimelineEventCallbackRecorder::CompleteEvent(TimelineEvent* event) {
TimelineEventEndlessRecorder::TimelineEventEndlessRecorder()
: head_(NULL), block_index_(0) {}
+TimelineEventEndlessRecorder::~TimelineEventEndlessRecorder() {
+ TimelineEventBlock* current = head_;
+ head_ = NULL;
+
+ while (current != NULL) {
+ TimelineEventBlock* next = current->next();
+ delete current;
+ current = next;
+ }
+}
void TimelineEventEndlessRecorder::PrintJSON(JSONStream* js,
TimelineEventFilter* filter) {
« no previous file with comments | « runtime/vm/timeline.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698