Removed memory leaks in function classes
continuous-integration/drone/push Build was killed Details

This commit is contained in:
Deukhoofd 2019-07-25 17:30:42 +02:00
parent e2a0c35992
commit d5e16c3826
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
2 changed files with 5 additions and 0 deletions

View File

@ -49,6 +49,10 @@ namespace Porygon::Evaluation {
_hash(hash), _options(new vector<shared_ptr<GenericFunctionOption>>()){
}
~GenericFunctionEvalValue() final{
delete _options;
}
GenericFunctionEvalValue(const GenericFunctionEvalValue& _) = delete;
GenericFunctionEvalValue() = delete;
GenericFunctionEvalValue& operator =(GenericFunctionEvalValue v) = delete;

View File

@ -67,6 +67,7 @@ namespace Porygon {
for (auto o: *_options){
delete o;
}
delete _options;
}
void RegisterFunctionOption (GenericFunctionOption * opt) const{