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

Unified Diff: src/allocation-tracker.cc

Issue 155513004: Fix allocation tracker leaks. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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: src/allocation-tracker.cc
diff --git a/src/allocation-tracker.cc b/src/allocation-tracker.cc
index 59ba6c99a67241345f02e84032326dec7ddea1da..5ec64846015ec7d19d011e3125ada144da27d40a 100644
--- a/src/allocation-tracker.cc
+++ b/src/allocation-tracker.cc
@@ -46,6 +46,7 @@ AllocationTraceNode::AllocationTraceNode(
AllocationTraceNode::~AllocationTraceNode() {
+ for (int i = 0; i < children_.length(); i++) delete children_[i];
}
@@ -155,6 +156,11 @@ AllocationTracker::AllocationTracker(
AllocationTracker::~AllocationTracker() {
unresolved_locations_.Iterate(DeleteUnresolvedLocation);
+ for (HashMap::Entry* p = id_to_function_info_.Start();
+ p != NULL;
+ p = id_to_function_info_.Next(p)) {
+ delete reinterpret_cast<AllocationTracker::FunctionInfo* >(p->value);
+ }
}
« 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