mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 18:53:23 -03:00
Make CScript::clear() release its memory
This commit is contained in:
parent
b0875eb3fe
commit
fff7455ded
1 changed files with 6 additions and 0 deletions
|
@ -730,6 +730,12 @@ public:
|
||||||
{
|
{
|
||||||
return CScriptID(Hash160(*this));
|
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.
|
/** Compact serializer for scripts.
|
||||||
|
|
Loading…
Add table
Reference in a new issue