Use Arena's to manage Metric memory where appropriate
This commit is contained in:
@@ -637,6 +637,14 @@ template <typename T> struct ArenaVector {
|
||||
T &operator[](size_t index) { return data_[index]; }
|
||||
const T &operator[](size_t index) const { return data_[index]; }
|
||||
|
||||
void clear() { size_ = 0; }
|
||||
|
||||
// Iterator support for range-based for loops
|
||||
T *begin() { return data_; }
|
||||
const T *begin() const { return data_; }
|
||||
T *end() { return data_ + size_; }
|
||||
const T *end() const { return data_ + size_; }
|
||||
|
||||
// No destructor - arena cleanup handles memory
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user