From 188d89db942bfdcb67514e447bb56726f763ca55 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Wed, 29 May 2019 15:00:41 +0200 Subject: [PATCH] Fixed memory leak in script variables --- src/Script.cpp | 3 +++ 1 file changed, 3 insertions(+) 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; }