diff --git a/src/Evaluator/Evaluator.cpp b/src/Evaluator/Evaluator.cpp index ba8016a..999ee2f 100644 --- a/src/Evaluator/Evaluator.cpp +++ b/src/Evaluator/Evaluator.cpp @@ -206,6 +206,8 @@ shared_ptr Evaluator::EvaluateFunctionCallExpression(BoundExpression* } this->_evaluationScope->OuterScope(); this->EvaluateBlockStatement(function->GetInnerBlock().get()); + + delete this->_evaluationScope; this->_evaluationScope = originalScope; this->_hasReturned = false; auto r = this -> _returnValue;