Index: runtime/vm/kernel.cc |
diff --git a/runtime/vm/kernel.cc b/runtime/vm/kernel.cc |
index 48dcbdeeb7b13cbe35a67e1a0ae8b3ec0d6494ec..80ffe1d935ce537f24d1ebe2be3ed41ee6de6b2a 100644 |
--- a/runtime/vm/kernel.cc |
+++ b/runtime/vm/kernel.cc |
@@ -1177,7 +1177,14 @@ void TypeParameter::VisitChildren(Visitor* visitor) { |
} |
-Program::~Program() {} |
+Program::~Program() { |
+ while (valid_token_positions.length() > 0) { |
+ delete valid_token_positions.RemoveLast(); |
+ } |
+ while (yield_token_positions.length() > 0) { |
+ delete yield_token_positions.RemoveLast(); |
+ } |
+} |
void Program::AcceptTreeVisitor(TreeVisitor* visitor) { |