Fixed memory leak in script variables

This commit is contained in:
Deukhoofd 2019-05-29 15:00:41 +02:00
parent 3c0df2e615
commit 188d89db94
No known key found for this signature in database
GPG Key ID: B4C087AC81641654
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}