Fixed EffectParameter memory leak.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
d2320fde3c
commit
a6ab69e043
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue