diff options
Diffstat (limited to 'rotord/src')
| -rwxr-xr-x | rotord/src/rotor.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h index b2f50e6..a247c66 100755 --- a/rotord/src/rotor.h +++ b/rotord/src/rotor.h @@ -167,6 +167,9 @@ namespace Rotor { Node(){duplicate_inputs=false;}; virtual Node* clone(map<string,string> &_settings)=0; //pure virtual virtual ~Node(){ + for (auto a: attributes) delete a.second; + for (auto p: parameters) delete p.second; + for (auto s: inputs) delete s; }; vector<Signal_input*> inputs; //simple node can have signal inputs, output depends on node type unordered_map<string,Parameter*> parameters; //linked parameters can convert from settings to inputs @@ -234,7 +237,9 @@ namespace Rotor { }; class Image_node: public Node{ public: - virtual ~Image_node(){}; + virtual ~Image_node(){ + for (auto i: image_inputs) delete i; + }; vector<Image_input*> image_inputs; //image node also has image inputs and outputs void create_image_input(const string &_title,const string &_desc,Node* _connect=nullptr) { image_inputs.push_back(new Image_input(_desc,_title,_connect)); |
