Skip to content

Commit

Permalink
Add map reset to llil4map.cc.
Browse files Browse the repository at this point in the history
  • Loading branch information
greg7mdp committed Apr 1, 2024
1 parent 4aa19d6 commit 29c3091
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/llil4map.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<str_type&>(x.first)), x.second);

// reset the set (no longer needed) to reclaim memory early
set = map_str_int_type::EmbeddedSet();
});
}
}
Expand Down

0 comments on commit 29c3091

Please sign in to comment.