From 29c3091e509be61e686358543b06b0cf09c810a9 Mon Sep 17 00:00:00 2001 From: greg7mdp Date: Sun, 31 Mar 2024 22:06:55 -0400 Subject: [PATCH] Add map reset to `llil4map.cc`. --- examples/llil4map.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/llil4map.cc b/examples/llil4map.cc index 790bc3a..37bbf5d 100644 --- a/examples/llil4map.cc +++ b/examples/llil4map.cc @@ -416,6 +416,9 @@ int main(int argc, char* argv[]) auto it = I[i]; for (auto& x : set) *it++ = std::make_pair(std::move(const_cast(x.first)), x.second); + + // reset the set (no longer needed) to reclaim memory early + set = map_str_int_type::EmbeddedSet(); }); } }