Make CScript::clear() release its memory
This commit is contained in:
1 parent
b0875eb3fe
commit
fff7455ded
1 file changed
+6
@@ -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