diff --git a/src/script.h b/src/script.h index 7cb863d1c..1e2cc94ef 100644 --- a/src/script.h +++ b/src/script.h @@ -730,6 +730,12 @@ public: { return CScriptID(Hash160(*this)); } + + void clear() + { + // The default std::vector::clear() does not release memory. + std::vector().swap(*this); + } }; /** Compact serializer for scripts.