diff --git a/src/String/StringView.hpp b/src/String/StringView.hpp index 486dbde..7e33892 100644 --- a/src/String/StringView.hpp +++ b/src/String/StringView.hpp @@ -27,7 +27,11 @@ namespace ArbUt { : _value(new char[value.length() + 1]), _references(1) { strncpy(_value, value.data(), value.length() + 1); } - ~__ConstStringCharHolder() { delete[] _value; } + + ~__ConstStringCharHolder() noexcept { + delete[] _value; + _value = nullptr; + } inline void RemoveReference() noexcept { if (--_references <= 0) {