diff --git a/src/Evaluator/EvalValues/ScriptFunctionEvalValue.hpp b/src/Evaluator/EvalValues/ScriptFunctionEvalValue.hpp index 1539e50..4243db3 100644 --- a/src/Evaluator/EvalValues/ScriptFunctionEvalValue.hpp +++ b/src/Evaluator/EvalValues/ScriptFunctionEvalValue.hpp @@ -49,6 +49,10 @@ namespace Porygon::Evaluation { _hash(hash), _options(new vector>()){ } + ~GenericFunctionEvalValue() final{ + delete _options; + } + GenericFunctionEvalValue(const GenericFunctionEvalValue& _) = delete; GenericFunctionEvalValue() = delete; GenericFunctionEvalValue& operator =(GenericFunctionEvalValue v) = delete; diff --git a/src/FunctionScriptType.hpp b/src/FunctionScriptType.hpp index f67f6c3..21799d1 100644 --- a/src/FunctionScriptType.hpp +++ b/src/FunctionScriptType.hpp @@ -67,6 +67,7 @@ namespace Porygon { for (auto o: *_options){ delete o; } + delete _options; } void RegisterFunctionOption (GenericFunctionOption * opt) const{