diff options
Diffstat (limited to 'src/script.h')
-rw-r--r-- | src/script.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/script.h b/src/script.h index 7cb863d1c9..462e3f2302 100644 --- a/src/script.h +++ b/src/script.h @@ -7,7 +7,8 @@ #define H_BITCOIN_SCRIPT #include "key.h" -#include "util.h" +#include "utilstrencodings.h" +#include "tinyformat.h" #include <stdexcept> #include <stdint.h> @@ -730,6 +731,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. |