diff --git a/src/Library/EffectParameter.hpp b/src/Library/EffectParameter.hpp index b514cba..5093aab 100644 --- a/src/Library/EffectParameter.hpp +++ b/src/Library/EffectParameter.hpp @@ -23,6 +23,12 @@ namespace CreatureLib::Library { EffectParameter(const EffectParameter& other) = delete; EffectParameter& operator=(const EffectParameter& other) = delete; + ~EffectParameter() { + if (_type == EffectParameterType::String) { + delete[](char*) _val; + } + } + EffectParameterType GetType() const noexcept { return _type; } bool AsBool() const { if (_type != EffectParameterType::Bool) {