Clarify prevector::erase and avoid swap-to-clear

This commit is contained in:
Pieter Wuille
2017-06-05 12:17:40 -07:00
parent 400fdd08cc
commit e241a63c23
2 changed files with 9 additions and 2 deletions

View File

@ -642,8 +642,9 @@ public:
void clear()
{
// The default std::vector::clear() does not release memory.
CScriptBase().swap(*this);
// The default prevector::clear() does not release memory
CScriptBase::clear();
shrink_to_fit();
}
};