fix memory leak on variable set
This commit is contained in:
parent
5968068989
commit
68f604de8e
1 changed files with 4 additions and 1 deletions
|
|
@ -291,7 +291,10 @@ public:
|
||||||
cmd(arglist* in=nullptr) { type=_obj::block_cmd; args=in; }
|
cmd(arglist* in=nullptr) { type=_obj::block_cmd; args=in; }
|
||||||
~cmd() {
|
~cmd() {
|
||||||
if(args!=nullptr) delete args;
|
if(args!=nullptr) delete args;
|
||||||
for(auto it: var_assigns) delete it.second;
|
for(auto it: var_assigns) {
|
||||||
|
delete it.first;
|
||||||
|
delete it.second;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static const std::string empty_string;
|
static const std::string empty_string;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue