Use Arena's to manage Metric memory where appropriate

This commit is contained in:
2025-08-31 11:54:17 -04:00
parent b52d6e5a13
commit 93ccd2eb71
3 changed files with 416 additions and 205 deletions

View File

@@ -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: