Index: src/utils.h |
diff --git a/src/utils.h b/src/utils.h |
index 5790d878b9a4b87d24f74466c831d35241d1d935..070ae7cabebaec1aaa2b456d6773115361651716 100644 |
--- a/src/utils.h |
+++ b/src/utils.h |
@@ -640,7 +640,14 @@ class Collector { |
} |
// Resets the collector to be empty. |
- virtual void Reset(); |
+ virtual void Reset() { |
+ for (int i = chunks_.length() - 1; i >= 0; i--) { |
+ chunks_.at(i).Dispose(); |
+ } |
+ chunks_.Rewind(0); |
+ index_ = 0; |
+ size_ = 0; |
+ } |
// Total number of elements added to collector so far. |
inline int size() { return size_; } |