diff --git a/src/Script.cpp b/src/Script.cpp index dd6414b..9d2a4c2 100644 --- a/src/Script.cpp +++ b/src/Script.cpp @@ -28,6 +28,9 @@ Script::~Script() { delete this -> BoundScript; delete this -> _lastValue; delete this -> _evaluator; + for (auto v : *this -> _scriptVariables){ + delete v.second; + } this->_scriptVariables->clear(); delete this->_scriptVariables; }