diff options
author | Volker Fischer <corrados@users.noreply.github.com> | 2021-07-28 19:02:13 +0200 |
---|---|---|
committer | Volker Fischer <corrados@users.noreply.github.com> | 2021-07-28 19:02:13 +0200 |
commit | 61630a321ac59da01240a4b359c591e567aa84ed (patch) | |
tree | 0e4eeed42dabe4c46f06153f9e3914177a6b7967 /src/memory_heap.h | |
parent | 78c4c6abba8b02e3181c09ce9671cf454553c730 (diff) | |
parent | 62f7f2b2b004162b06af844dbc1a3cda696cfd9e (diff) |
Merge remote-tracking branch 'origin/develop' into edrumulus
Diffstat (limited to 'src/memory_heap.h')
-rw-r--r-- | src/memory_heap.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/memory_heap.h b/src/memory_heap.h index 3f0105a..658598c 100644 --- a/src/memory_heap.h +++ b/src/memory_heap.h @@ -61,6 +61,7 @@ public: T& get(Index index); const T& get(Index index) const; void remove(Index index); + void clear(); private: std::vector<T> memory; @@ -119,3 +120,10 @@ void MemoryHeap<T>::remove(Index index) { free_indices.push_back(index); } + +template <typename T> +void MemoryHeap<T>::clear() +{ + memory.clear(); + free_indices.clear(); +} |