mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-05 21:24:47 +02:00
Make CScript::clear() release its memory
This commit is contained in:
@ -730,6 +730,12 @@ public:
|
||||
{
|
||||
return CScriptID(Hash160(*this));
|
||||
}
|
||||
|
||||
void clear()
|
||||
{
|
||||
// The default std::vector::clear() does not release memory.
|
||||
std::vector<unsigned char>().swap(*this);
|
||||
}
|
||||
};
|
||||
|
||||
/** Compact serializer for scripts.
|
||||
|
Reference in New Issue
Block a user