Browse Source

Make CScript::clear() release its memory

0.10
Pieter Wuille 10 years ago
parent
commit
fff7455ded
  1. 6
      src/script.h

6
src/script.h

@ -730,6 +730,12 @@ public: @@ -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.

Loading…
Cancel
Save