Skip to content

Commit

Permalink
replace erase() with clear() to make imported keylist deconstruction…
Browse files Browse the repository at this point in the history
… faster
  • Loading branch information
jiangyujie.jyj committed Nov 3, 2023
1 parent c89332e commit 17956d6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions obj_gen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -527,10 +527,9 @@ imported_keylist::imported_keylist(const char *filename)
{
}

imported_keylist::~imported_keylist()
{
for (int i = 0; i < m_keys.size(); i++) {
free(m_keys.front());
imported_keylist::~imported_keylist() {
for (unsigned int i = 0; i < m_keys.size(); i++) {
free(m_keys[i]);
}
m_keys.clear();
}
Expand Down

0 comments on commit 17956d6

Please sign in to comment.