mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-02 03:31:35 +02:00
Clarify prevector::erase and avoid swap-to-clear
This commit is contained in:
@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user