Reset pointer on charholder to prevent multiple deletions.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
49b5e2cfe9
commit
030f82d34f
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue