diff options
| author | Comment <tim@gray.(none)> | 2013-09-09 22:21:45 +0100 |
|---|---|---|
| committer | Comment <tim@gray.(none)> | 2013-09-09 22:21:45 +0100 |
| commit | 695d389eb125cbbd469a8de53616579b18a1bfba (patch) | |
| tree | db1f12b6a2a6818d65ff3892e3ef0e489912ab6d /rotord/src/rotor.h | |
| parent | 5606479f9ef49f11a39c52cbad925edbb8709c76 (diff) | |
| parent | 79af8bf904b9ddb50b11ac231a2db517f1bdd55b (diff) | |
Merge branch 'master' of eclectronics.org@eclectronics.org:rotor
Diffstat (limited to 'rotord/src/rotor.h')
| -rw-r--r-- | 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 100644 --- 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)); |
